EmptyPageDetectionParams Object (IEmptyPageDetectionParams Interface)
This object allows you to tune the parameters of empty page detection with the help of the FRPage::IsEmpty method.
You can set the maximum number of different types of objects which still allows the page to be considered empty. If for any one of these types more objects are found on the page than the limit you specify, the page will not be considered empty, and the IsEmpty method will return FALSE.
The EmptyPageDetectionParams object is a persistent object. This means that the object's current state can be written to persistent storage: an area in the global memory or a disk file. Later, the object can be re-created by reading the object's state from persistent storage. The following methods provide persistence of the object: SaveToFile, LoadFromFile, SaveToMemory, and LoadFromMemory.
Properties
Name | Type | Description |
---|---|---|
Application | Engine, read-only | Returns the Engine object. |
Main settings | ||
MaxAlphabetLetters | int |
Specifies the maximum number of letters belonging to the recognition languages' alphabets found on the page, for which it can still be considered empty. It can take values from -1 (which means that the letter limit is not used) to 100. The default value of this property is 2. |
MaxBlackPercentage | int |
Specifies the maximum percentage of black areas on the page, for which it can still be considered empty. It can take values from -1 (which means that the black percentage limit is not used) to 100. The default value of this property is -1, and the black percentage is not used during empty page detection. |
MaxTextObjects | int |
Specifies the maximum number of text objects found on the page, for which it can still be considered empty. It can take values from -1 (which means that the text object limit is not used) to 100. The default value of this property is 20. |
NeedCheckBarcodes | VARIANT_BOOL |
Specifies if the page must be searched for barcodes. If you set this property to TRUE, the page will be additionally checked for barcodes even if it was considered empty by other criteria. If any barcodes are found, the page will be considered not empty. The default value of this property is FALSE. |
UseMargins | VARIANT_BOOL |
Specifies if the LeftMargin, TopMargin, RightMargin, BottomMargin properties must be used for determining the page rectangle. If this property is set to FALSE, the page rectangle is determined automatically, regardless of the ...Margin properties. The default value of this property is FALSE. |
Page margins | ||
LeftMargin | int |
Specifies the width of the left margin, which must not be considered when determining if the page is empty. It can take values from 0 to 300 (in millimeters). The default value of this property is 0. |
TopMargin | int |
Specifies the width of the top margin, which must not be considered when determining if the page is empty. It can take values from 0 to 300 (in millimeters). The default value of this property is 0. |
RightMargin | int |
Specifies the width of the right margin, which must not be considered when determining if the page is empty. It can take values from 0 to 300 (in millimeters). The default value of this property is 0. |
BottomMargin | int |
Specifies the width of the bottom margin, which must not be considered when determining if the page is empty. It can take values from 0 to 300 (in millimeters). The default value of this property is 0. |
Methods
Name | Description |
---|---|
CopyFrom | Initializes properties of the current object with values of similar properties of another object. |
LoadFromFile | Restores the object contents from a file on disk. |
LoadFromMemory | Restores the object contents from the global memory. |
SaveToFile | Saves the object contents into a file on disk. |
SaveToMemory | Saves the object contents into the global memory. |
Output parameter
This object is the output parameter of the CreateEmptyPageDetectionParams method of the Engine object.
Input parameter
This object is passed as an input parameter to the IsEmpty method of the FRPage object.
See also
17.09.2024 15:14:40