skew and orientation

  • 201 Views
  • Last Post 06 September 2018
Rama Reddy posted this 05 September 2018

How to deal with skew and orientation? what is difference between them exactly? and if image has 60 degree slight and in that text has different slights angles then how to handle it? 

when we need to use text orientation and when we can use image mode rotation type?

Attached Files

Order By: Standard | Newest | Votes
Koen de Leijer posted this 05 September 2018

Hi Rama

Both are described in the documentation:

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis
Working with Properties

 

   ABBYY FineReader Engine 11 API Reference

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

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.

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.

GeometryCorrectionMode GeometryCorrectionModeEnum Specifies whether geometrical distortions (perspective on photos, curved lines from scanned books, etc.) should be removed during page preprocessing.

This property is GCM_Auto by default.

OrientationDetectionParams OrientationDetectionParams Provides access to the parameters of orientation detection.

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

ResolutionCorrectionMode ResolutionCorrectionModeEnum Specifies whether resolution of the image should be corrected during page preprocessing.

This property is RCM_Auto by default, which means that if resolution of the image is suspicious, FineReader Engine should automatically detect image resolution and change it.

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 demo tools: Camera OCR, Classification, Image Preprocessing.

See also

Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis
Working with Properties

 

See one of my other posts with an example of orientation and rotation,
https://forum.ocrsdk.com/thread/automatic-rotation-of-pages-via-abbyy-finereader-engine/

What have you tried so far? Please post your Java-code.

Best regards
Koen de Leijer

Koen de Leijer posted this 06 September 2018

See also your other question: https://forum.ocrsdk.com/thread/image-preprocessing

Close