L_OcrPage_GetRotateAngle (original) (raw)
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
- 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.
See Also
Functions
- L_OcrPage_Destroy
- L_OcrPage_FromBitmap
- L_OcrPage_GetBitmap
- L_OcrPage_SetBitmap
- L_OcrPage_GetOverlayBitmap
- L_OcrPage_SetOverlayBitmap
- L_OcrPage_SetBitmapChangedCallback
- L_OcrPage_IsInverted
- L_OcrPage_GetDeskewAngle
- L_OcrPage_AutoPreprocess
- L_OcrPage_AutoZone
- L_OcrPage_GetZoneCount
- L_OcrPage_InsertZone
- L_OcrPage_AddZone
- L_OcrPage_IndexOfZone
- L_OcrPage_GetZoneAt
- L_OcrPage_SetZoneAt
- L_OcrPage_RemoveZone
- L_OcrPage_RemoveZoneAt
- L_OcrPage_ClearZones
- L_OcrPage_GetZoneCells
- L_OcrPage_SetZoneCells
- L_OcrPage_HitTestZone
- L_OcrPage_IsRecognized
- L_OcrPage_Recognize
- L_OcrPage_Unrecognize
- L_OcrPage_GetRecognizeStatistics
- L_OcrPage_GetRecognizedCharacters
- L_OcrPage_SetRecognizedCharacters
- L_OcrPage_FreePageCharacters
- L_OcrPage_GetZoneWords
- L_OcrPage_FreeWords
- L_OcrPage_GetText
- L_OcrPage_ExtractZoneMICRData
- L_OcrPage_DetectLanguages
- L_OcrPage_LoadZonesFile
- L_OcrPage_SaveZonesFile
- L_OcrPage_SaveXml
- L_OcrPage_GetAutoPreprocessValues
Topics
- Programming with LEADTOOLS OCR Module - LEAD Engine
- Starting and Shutting Down the OCR Engine
- Recognizing OCR Pages
- Working With OCR Pages
Example
For an example, refer to L_OcrPage_GetDeskewAngle