Sets the recognized character data of this L_OcrPage
#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_SetRecognizedCharacters(page, pageCharacters)
Handle to the OCR page.
Pointer to L_OcrPageCharacters structure that contains the modified page characters to set back in the page.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Use this method to set the recognized characters of a page after you modify them. To get the recognized characters of a page use L_OcrPage_GetRecognizedCharacters.
You must call this method after the L_OcrPage has been recognized with the L_OcrPage_Recognize method. i.e., if the value of the L_OcrPage_IsRecognized method of this page is L_FALSE, then calling this method will return SUCCESS and 'pageCharacters' parameter won't be updated.
You can use the L_OcrPage_GetRecognizedCharacters to examine the recognized character data. This data contain information about the character codes, their confidence, guess codes, location and position in the page as well as font information. For more information, refer to L_OcrCharacter.
If you wish to modify and the apply recognition data back to the page, Use L_OcrPage_SetRecognizedCharacters.
Use L_OcrPage_GetZoneWords to get the recognized words of a zone.
Notes on spaces: The LEADTOOLS OCR Module - LEAD Engine will not return any space characters when using the L_OcrPage_GetRecognizedCharacters method.
The L_OcrPage_SetRecognizedCharacters method will accept space characters in the LEADTOOLS LEAD engine. However, these space characters will be used when generating the final document (PDF) and might affect the final output. Therefore, it is not recommended that you insert space characters when using the LEADTOOLS LEAD engine.
Note: You should call L_OcrPage_FreePageCharacters on the 'pageCharacters' parameter to free its allocated memory when no longer needed.
For an example, refer to L_OcrPage_GetRecognizedCharacters