ImageGear .NET v25.2 - Updated
ImageGear.OCR Assembly / ImageGear.OCR Namespace / ImGearOCRImage Class / DetectBlankPage Method / DetectBlankPage(Int32,Boolean) Method
Specifies the maximum size of an object on the page for it to be disregarded as noise. Object here means a connected group of black pixels after binarization. The object size is a diagonal of the minimum circumscribed rectangle that contains the object. Default value is 12.
Setting this to true will attempt to detect and remove hole punches from the page before determining if the page is blank. May increase processing time for dot-shaded documents. Default value is false.




In This Topic
    DetectBlankPage(Int32,Boolean) Method
    In This Topic
    Detects whether or not the image is considered to be blank.
    Syntax
    'Declaration
     
    Public Overloads MustOverride Function DetectBlankPage( _
       ByVal maximumNoiseObjectSize As Integer, _
       ByVal ignoreHolePunches As Boolean _
    ) As Boolean
    'Usage
     
    Dim instance As ImGearOCRImage
    Dim maximumNoiseObjectSize As Integer
    Dim ignoreHolePunches As Boolean
    Dim value As Boolean
     
    value = instance.DetectBlankPage(maximumNoiseObjectSize, ignoreHolePunches)
    public abstract bool DetectBlankPage( 
       int maximumNoiseObjectSize,
       bool ignoreHolePunches
    )
    public: abstract bool DetectBlankPage( 
       int maximumNoiseObjectSize,
       bool ignoreHolePunches
    ) 
    public:
    abstract bool DetectBlankPage( 
       int maximumNoiseObjectSize,
       bool ignoreHolePunches
    ) 

    Parameters

    maximumNoiseObjectSize
    Specifies the maximum size of an object on the page for it to be disregarded as noise. Object here means a connected group of black pixels after binarization. The object size is a diagonal of the minimum circumscribed rectangle that contains the object. Default value is 12.
    ignoreHolePunches
    Setting this to true will attempt to detect and remove hole punches from the page before determining if the page is blank. May increase processing time for dot-shaded documents. Default value is false.

    Return Value

    True if the image is blank, otherwise False.
    Remarks

    This method will consider an image to be blank (all or mostly white) if there is only a small percentage of noise, especially noise around the edge of the image usually created as a result of scanning.

    This method is intended for use on scanned documents and not pictures or photographs.

    See Also