SetAutomaticRotationOCR_A

When this action is called with the parameter True, it forces image orientation detection and rotation in all of the OCR/A recognition actions.

Member of namespace

RecognitionOCR_A

Syntax

bool SetAutomaticRotationOCR_A ()

Parameters

EnableRotation: String, indicates if auto rotation should be enabled. True, forces image orientation detection and rotation during recognition. This is the default value. False, image orientation and rotation will not be performed.

Returns

Always True.

Level

All levels.

Details

When this action is called with the parameter True, it forces image orientation detection and rotation in all of the OCR/A recognition actions. If this action is not called, the value will default to True so rotation will be automatically performed. The page language needs to be set for the proper rotation of the page. For example, Hebrew pages may be rotated upside-down if the language is not set. Typically rotation by the recognition engine is more reliable than using the automatic rotation available in the Image Enhancement actions as the Image Enhancement actions will rotate an image based on the image geometry and the recognition engine can rotate based on the language.

An image should always be in the correct orientation and deskewed to obtain the best recognition results and proper text coordinates. If used, this action must be called prior to recognition and both actions must be called at the same level. If RotateImageOCR_A has already been used on an image or if your documents are guaranteed to be in the correct orientation, it is recommended to call SetAutomaticRotationOCR_A(False) prior to recognition so recognition will not reanalyze the image to see if it needs rotation.

Backup Image File

When an image requires rotation, the original image will be saved in a backup file within the batch using a name similar to: "filename.ocra.ext". For example, if the original file name was "TM000001.tif", the new name of the original file will be "TM000001.ocra.tif" and the the file "TM000001.tif" will be updated with the corrected rotation and skew. The suffix added to the original file name can be controlled by setting the DCO variable y_ImageSuffix. If not set, the value will default to ".ocra"

Example:
SetAutomaticRotationOCR_A("True")
RecognizePageOCR_A()