L_OcrPage_GetRotateAngle

Summary

Gets the angle of the rotation of this L_OcrPage in degrees.

Syntax

#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_GetRotateAngle(page, value, confidence)

Parameters

L_OcrPage page

Handle to the OCR page.

L_INT* value

Address to L_INT variable to be updated with the page rotation angle.

L_INT* confidence

Address to L_INT variable to be updated with the rotation angle detection confidence.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Gets the angle of the rotation of this L_OcrPage in degrees. A positive value indicates a counter-clockwise rotation.

This method will return one of the following values:

Value Description
0 The bitmap is not rotated
90 The bitmap is rotated 90 degrees (counter-clockwise rotation).
180 The bitmap is rotated 180 degrees (counter-clockwise rotation).
270 The bitmap is rotated 270 degrees (counter-clockwise rotation).

Use L_OcrPage_AutoPreprocess with L_OcrAutoPreprocessPageCommands_Rotate to automatically rotate the page bitmap prior to calling L_OcrPage_Recognize. This could enhance the quality of the image before starting its recognition.

If the bitmap is rotated, L_OcrPage_GetRotateAngle will return the angle required to fix the orientation of the page, if you call L_OcrPage_AutoPreprocess on the page, all subsequent calls to L_OcrPage_GetRotateAngle will return 0 since the bitmap is not rotated. Hence, you must use L_OcrPage_GetRotateAngle before calling L_OcrPage_AutoPreprocess.

Use L_OcrPage_GetAutoPreprocessValues to obtain the accumulative pre-processing values applied to this L_OcrPage.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to L_OcrPage_GetDeskewAngle

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.