Visual Basic |
---|
Public Sub DocumentBlankPageDetectEx( _ ByVal LeftMargin As Long, _ ByVal TopMargin As Long, _ ByVal RightMargin As Long, _ ByVal BottomMargin As Long, _ ByVal MinObjectDimension As Long, _ ByVal GapFill As Long, _ ByVal IgnoreBorder As Boolean _ ) |
- LeftMargin
The number of rows of pixels to ignore on the left edge of the image. If IgnoreBorder is False, this margin applies to the sides of the original image. If IgnoreBorder is True, this margin is applied to the sides of the page, inside the detected border.
Range: 0 - 2,147,483,647
Default: 0
- TopMargin
The number of rows of pixels to ignore on the top edge of the image. If IgnoreBorder is False, this margin applies to the sides of the original image. If IgnoreBorder is True, this margin is applied to the sides of the page, inside the detected border.
Range: 0 - 2,147,483,647
Default: 0
- RightMargin
The number of rows of pixels to ignore on the right edge of the image. If IgnoreBorder is False, this margin applies to the sides of the original image. If IgnoreBorder is True, this margin is applied to the sides of the page, inside the detected border.
Range: 0 - 2,147,483,647
Default: 0
- BottomMargin
The number of rows of pixels to ignore on the bottom edge of the image. If IgnoreBorder is False, this margin applies to the sides of the original image. If IgnoreBorder is True, this margin is applied to the sides of the page, inside the detected border.
Range: 0 - 2,147,483,647
Default: 0
- MinObjectDimension
Minimum width or height of a black object considered non-blank. Set it higher to ignore larger objects (causing more pages to be considered blank) or lower to notice smaller objects (causing more pages to be considered non-blank.)
Range: 0 - 2,147,483,647
Default: 10
- GapFill
Maximum spacing between black objects considered connected. Set it higher to cause broken objects to be considered as two parts of a larger object (causing more pages to be considered non-blank) or lower to cause neighboring black objects to be treated separately (causing more pages to be considered blank.)
Range: 0 - 2,147,483,647
Default: 5
- IgnoreBorder
Flag to do a quick search for over scan in the border, and moves detection area inside the detected over scanned border. If this property is set to True and the image does not have an actual border, there is a possibility that the method will return a false positive.
Valid Values: True or False
Default: False
This method is similar to the DocumentBlankPageDetect method, but separates the parameters for each margin. Use this function for direct control over each margin value.
ImagXpress examines an image and determines if it is blank or not, using parameters provided. The current image remains unchanged.
Outputs:
- The IPBlankPageDetected property is set to True, if the page is blank, otherwise it is False.
- The IPConfidence property provides an indication of the confidence of the result.
To use the DocumentBlankPageDetectEx method
- Load a 1-bit image from a file or stream input.
- Call the DocumentBlankPageDetectEx method.
- Examine the BlankPageDetect and Confidence properties for their values.
Note: Available in Professional Edition.