L_OcrCharacter

Summary

Represents recognized character data.

Syntax

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]; 
   L_INT ActualBase; 
   L_COLORREF BackgroundColor; 
   L_UINT GuessConfidence1; 
   L_UINT GuessConfidence2; 
   L_INT ReservedArray[16]; 
}; 
typedef struct L_OcrCharacter L_OcrCharacter; 

Member

StructSize

Structure size. It should be equal to sizeof(L_OcrCharacter).

Code

Gets or sets the code (value) of the character.

GuessCode1

Gets or sets the first guess of the recognition, if any.

GuessCode2

Gets or sets the second guess of the recognition, if any.

Reserved2

Reserved for future use.

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's 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 the 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's font attributes.

Color

Gets or sets the character's 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's rotation angle. A positive value indicates a counter-clockwise rotation.

Reserved

Reserved, For internal use.

EngineData

For internal use.

ActualBase

Gets or sets the length of the Y coordinate of the actual baseline associated with the word measured from the top edge of the rectangle exactly containing the character. This actual baseline follows the angle of the word containing character.

BackgroundColor

Gets or sets the background color for the character.

GuessConfidence1

Gets the confidence value of the first guess of the recognition, if any.

GuessConfidence2

Gets the confidence value of the second guess of the recognition, if any.

ReservedArray

Reserved, 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.

Usage

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.