PagePreprocessingParams Object (IPagePreprocessingParams Interface)
This object is used for tuning different parameters of page preprocessing. Page preprocessing is performed before page analysis. This stage includes correction of page orientation, image inversion, and removal of geometrical distortions. A pointer to this object is passed as a member of the PageProcessingParams object into processing methods.
The PagePreprocessingParams 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.
|Application||Engine, read-only||Returns the Engine object.|
If this property is set to TSPV_Yes, a noise reduction filter is applied to the image during page preprocessing. TSPV_No disables noise reduction and can be used to avoid possible slowdowns in preprocessing.
The default value of this property is TSPV_Auto. In the default mode, ABBYY FineReader Engine applies noise reduction automatically, depending on the source of the processed image.
Specifies whether geometrical distortions (perspective on photos, curved lines from scanned books, etc.) should be removed during page preprocessing.
This property is TSPV_Auto by default. In default mode, ABBYY FineReader Engine corrects geometry for photographs.
This property set to TRUE tells ABBYY FineReader Engine to detect whether the image is inverted (white text against black background). The text color is detected during page prerocessing, and if it differs from normal, ABBYY FineReader Engine automatically inverts the image.
This property is FALSE by default.
If this property is TRUE, the page orientation is detected during page prerocessing, and if it differs from normal, ABBYY FineReader Engine automatically rotates the image.
Note: If this property is set to TRUE:
This property is FALSE by default.
Specifies whether resolution of the image should be corrected during page preprocessing.
This property is TSPV_Auto by default, which means that if resolution of the image is suspicious, FineReader Engine should automatically detect image resolution and change it, so that the recognition results would be more reliable.
If this property is set to TSPV_Yes, the image preprocessing will include correction of excessive shadows and highlighting to improve recognition quality. This property is designed for use with photographs only.
The default value of this property is TSPV_Auto.
If this property is set to TSPV_Yes, image skew will be corrected during page preprocessing. The type of skew correction is defined by the CorrectSkewMode property.
If this property is set to TSPV_No, the value of the CorrectSkewMode property is ignored.
Note: Skew can be corrected only for angles not greater than 20 degrees.
By default, this property is set to TSPV_Auto.
Specifies the mode of skew correction. The value of this property is an OR superposition of the CorrectSkewModeEnum enumeration constants which denote the types of skew correction. 0 means do not correct skew.
The value of this property is ignored, if the CorrectSkew property is set to TSPV_No.
By default, this property is set to CSM_CorrectSkewByHorizontalText | CSM_CorrectSkewByVerticalText.
If this property is set to TSPV_Yes, during preprocessing ABBYY FineReader Engine will detect document edges on the image and crop the image accordingly.
Note: This feature is not supported for black-and-white images.
The default value of this property is TSPV_Auto. In the default mode, ABBYY FineReader Engine crops the image or skips this step automatically, depending on the source of the processed image.
Provides access to the parameters of orientation detection.
These parameters are ignored, if the value of the CorrectOrientation property is FALSE.
|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.|
This object is the output parameter of the CreatePagePreprocessingParams method of the Engine object.
This object is passed as an input parameter to the following methods:
- Preprocess, PreprocessPages methods of the FRDocument object
- Preprocess method of the FRPage object
The object is used in the following code samples: CommandLineInterface; and demo tools: Camera OCR, Classification, Image Preprocessing.
Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis
3/24/2023 8:51:52 AM