L_OcrWord

Summary

Represents recognized word data.

Syntax

struct L_OcrWord 
{ 
   L_UINT StructSize; 
   L_WCHAR* Value; 
   L_WCHAR Buffer[128]; 
   L_RECT Bounds; 
   L_UINT FirstCharacterIndex; 
   L_UINT LastCharacterIndex; 
   L_POINT ActualBaseStartPoint; 
   L_POINT ActualBaseEndPoint; 
}; 
typedef struct L_OcrWord L_OcrWord; 

Members

StructSize

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

Value

Gets or sets the word value.

Buffer

Pointer to L_OcrWord.Buffer, for internal use.

Bounds

Gets or sets the word coordinates in bitmap coordinates.

FirstCharacterIndex

Gets or sets the first index of word value in the L_OcrZoneCharacters.Characters.

LastCharacterIndex

Gets or sets the last index of word value in the L_OcrZoneCharacters.Characters.

ActualBaseStartPoint

Gets or sets the starting Y coordinate of the actual baseline associated with the word measured from the top edge of the rectangle exactly containing the word.

ActualBaseEndPoint

Gets or sets the ending Y coordinate of the actual baseline associated with the word measured from the top edge of the rectangle exactly containing the word.

Comments

You can get the recognized words of a zone with the L_OcrPage_GetZoneWords method. This is a helper method that iterate through the L_OcrCharacter array of the zone and constructs the words based on the L_OcrCharacter.Positions flags.

You can modify the OCR recognition results by updating page recognized characters you retrieved via a call to L_OcrPage_GetRecognizedCharacters and after you finish updating page characters you can call L_OcrPage_SetRecognizedCharacters before optionally saving the results to the final output document.

This structure is used inside L_OcrWords structure which in turn is used with the following functions:

L_OcrPage_GetZoneWords

L_OcrPage_FreeWords

Usage

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.