L_OcrCharacter

struct L_OcrCharacter 
{ 
   L_UINT StructSize; 
   L_WCHAR Code; 
   L_WCHAR GuessCode1; 
   L_WCHAR GuessCode2; 
   L_WCHAR Reserved2; 
   L_UINT Confidence; 
   L_BOOL WordIsCertain; 
   L_RECT Bounds; 
   L_OcrCharacterPositions Positions; 
   L_INT Base; 
   L_UINT CellIndex; 
   L_UINT LeadingSpaces; 
   L_UINT LeadingSpacesConfidence; 
   L_FLOAT FontSize; 
   L_OcrCharacterFontStyles FontStyles; 
   L_COLORREF Color; 
   L_OcrLanguage Language; 
   L_UINT16 RotationAngle; 
   L_UINT16 Reserved; 
   L_UCHAR EngineData[16]; 
}; 
typedef struct L_OcrCharacter L_OcrCharacter; 

Represents recognized character data.

Member Description
StructSize Structure size. It should be equal to sizeof(L_OcrCharacter).
Code Gets or sets the character code (value).
GuessCode1 Gets or sets the first guess of the recognition, if any.
GuessCode2 Gets or sets the second guess of the recognition, if any.
Confidence Gets or sets the confidence number expressing the recognition certainty for the first guess.
WordIsCertain Gets or sets a value indicating whether the word this character is part of has passed spell checking.
Bounds Gets or sets the coordinates of the rectangle exactly containing the character.
Positions Gets or sets the character position information. For a list of possible values, refer to L_OcrCharacterPositions.
Base Gets or sets the length of the Y coordinate of the baseline measured from the top edge of the rectangle exactly containing the character.
CellIndex Gets or sets the index of the cell in the table that contains this character.
LeadingSpaces Gets or sets the estimated number of leading spaces in front of the character.
LeadingSpacesConfidence Gets or sets the confidence number expressing the certainty of number of leading spaces in front of this character.
FontSize Gets or sets the font size of the character in points.
FontStyles Gets or sets the character font attributes.
Color Gets or sets the character color.
Language Gets or sets the language which the character belongs to. For a list of possible values, refer to L_OcrLanguage.
RotationAngle Gets or sets the character rotation angle.
Reserved Reserved, For internal use.
EngineData For internal use.

Comments

To get the recognized characters of a page, call L_OcrPage_GetRecognizedCharacters after L_OcrPage_Recognize.

To update the recognized characters of a page, call L_OcrPage_SetRecognizedCharacters before calling L_OcrDocument_Save or L_OcrDocument_SaveXml.

L_OcrPageCharacters contains a list of the characters of the zones.

L_OcrZoneCharacters contains a list of the characters for a particular zone.

L_OcrCharacter is the most detailed information available about the recognized characters.

Touching characters, those whose shapes are physically joined in the page passed to the OCR engine, will result in a separate L_OcrCharacter structure for each recognized character within the block. However, the coordinate property of these characters (Bounds) will have identical coordinates defining a rectangle boundary for the character block. The order of the L_OcrCharacter structures representing a character block gives the order of the touching characters on the original document. This means the coordinates do not give information on the order of characters inside a boundary block.

This structure is used inside L_OcrZoneCharacters structure which in turn is used inside the L_OcrPageCharacters which in turn is used by the following functions:

L_OcrPage_GetRecognizedCharacters

L_OcrPage_SetRecognizedCharacters

L_OcrPage_FreePageCharacters

L_OcrPage_GetZoneWords

Help Version 20.0.2018.6.21
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help