#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_GetRotateAngle(page, value, confidence)
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 |
Gets the angle of the rotation of this L_OcrPage in degrees.
Parameter | Description |
---|---|
page | Handle to the OCR page. |
value | Address to L_INT variable to be updated with the page rotation angle. |
confidence | Address to L_INT variable to be updated with the rotation angle detection confidence. |
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Gets the angle of the rotation of this L_OcrPage in degrees.
This method will return one of the following values:
Value | Description |
---|---|
0 | The bitmap is not rotated |
90 | The bitmap is rotated 90 degrees. |
180 | The bitmap is rotated 180 degrees. |
270 | The bitmap is rotated 270 degrees. |
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
LTOCR For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
For an example, refer to L_OcrPage_GetDeskewAngle.