Chinese Simplified (简体中文)

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.

Properties

Name Type Description
Application Engine, read-only Returns the Engine object.
ApplySigmaFilter ThreeStatePropertyValueEnum

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.

CorrectGeometry ThreeStatePropertyValueEnum

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.

CorrectInvertedImage VARIANT_BOOL

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.

CorrectOrientation VARIANT_BOOL

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:

  • the TextTypes property of the RecognizerParams object cannot be set to TT_Handprinted;
  • the TrainUserPatterns property of the RecognizerParams object cannot be set to TRUE.

This property is FALSE by default.

CorrectResolution ThreeStatePropertyValueEnum

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.

CorrectShadowsAndHighlights ThreeStatePropertyValueEnum

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.

CorrectSkew ThreeStatePropertyValueEnum

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.

CorrectSkewMode int

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.

CropImage ThreeStatePropertyValueEnum

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.

OrientationDetectionParams OrientationDetectionParams

Provides access to the parameters of orientation detection.

These parameters are ignored, if the value of the CorrectOrientation property is FALSE.

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.

Related objects

Object Diagram

Output parameter

This object is the output parameter of the CreatePagePreprocessingParams method of the Engine object.

Input parameter

This object is passed as an input parameter to the following methods:

Samples

The object is used in the following code samples: CommandLineInterface; and demo tools: Camera OCR, Classification, Image Preprocessing.

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis

Working with Properties

9/17/2024 3:14:41 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.