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.
BackgroundWhitening ThreeStatePropertyValueEnum

Specifies if image background should be whitened.

This property is TSPV_Auto by default. In default mode, ABBYY FineReader Engine whitens the background.

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 ThreeStatePropertyValueEnum

Specifies if inverted image should be corrected.

This property is TSPV_Auto by default. In default mode, ABBYY FineReader Engine corrects inverted images.

CorrectOrientationMode CorrectOrientationModeEnum

Specifies how image orientation should be corrected during preprocessing.

The default value is COM_Auto, which means orientation will be determined and corrected automatically if needed.

CorrectSkewMode CorrectSkewModeEnum

If this property is set to CSM_Auto or CSM_Fast, image skew will be corrected during page preprocessing.

Note: Skew can be corrected only for angles not greater than 20 degrees.

By default, this property is set to CSM_Auto, which means precise skew correction.

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.

DetectImageType ThreeStatePropertyValueEnum

Specifies how the image type is determined. Works in conjunction with ImageSourceType.

Default: TSPV_Auto (effective only when ImageSourceType = IST_Auto).

  • If ImageSourceType = IST_Auto:
    • TSPV_Auto/TSPV_Yes — the Engine detects the image type automatically.
    • TSPV_No — the Engine does not detect; it reads the image type from the file’s properties/metadata (faster, but depends on correct metadata).
  • If ImageSourceType is explicitly set to IST_Photo, IST_Scan, IST_Screenshot, IST_SyntheticImage, or IST_SyntheticText, detection is not performed (treated as TSPV_No) and the Engine reads the image type from properties/metadata.
DiscardColorImage VARIANT_BOOL

This property set to TRUE tells ABBYY FineReader Engine to leave only black-and-white plane in the prepared image. In this case, image binarization is performed during image preprocessing.

By default, this property is set to FALSE.

OverwriteResolutionMode OverwriteResolutionEnum

If this property is set to ORM_Auto, ABBYY FineReader Engine will automatically detect and overwrite image resolution.

If it is set to ORM_Manual, use the ResolutionToOverwrite property to specify the new image resolution.

The new resolution will be applied before all other stages of image preparation (such as binarization, skew correction, etc.).

Notes:

  • If you set this property to ORM_No and resolution of the prepared image is too low (less than 50 dpi), too high (more than 3200 dpi), or undefined, the image will not be opened and an error will occur.
  • If you are opening a PDF file, the new resolution will be used for image rasterization; image size in pixels may be modified according to the detected resolution and the page dimensions.

By default, the value of the property is ORM_Auto.

ResolutionToOverwrite int

This value is used to overwrite resolution of the preprocessed image if the OverwriteResolutionMode property is ORM_Manual.

Note that the default value of this property is 0, so you must set the desired value yourself. If you set OverwriteResolutionMode to ORM_Manual and don't set the value for this property, an error will occur.

SplitType PageSplitTypeEnum Specifies the parameters of page splitting.
StraightenLinesMode StraightenLinesModeEnum

Specifies how lines will be straightened.

This property is SLM_Auto by default. In this case new neural network algorithm would be used.

UseFastBinarization VARIANT_BOOL

If this property is TRUE, ABBYY FineReader Engine will use algorithms for fast image binarization. Binarization is performed either during preprocessing (if DiscardColorImage is TRUE), or later when a black-and-white image is necessary (e.g., when you call the IImageDocument::BlackWhiteImage property for an open image document for the first time). This property set to TRUE will speed up binarization; however, its quality may deteriorate.

By default, the value of this 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: Classification.

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis

Working with Properties

11/7/2025 12:48:30 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.