L_OcrPageAreaOptions

Summary

Represents the area of interest options to use with an OCR page.

Syntax

struct L_OcrPageAreaOptions 
{ 
   L_UINT StructSize; 
   L_RECT Area; 
   L_UINT IntersectPercentage; 
   L_BOOL UseTextZone; 
}; 
typedef struct L_OcrPageAreaOptions L_OcrPageAreaOptions; 

Members

StructSize

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

Area

Area of interest rectangle in the page. The default value is an empty rectangle.

IntersectPercentage

Percentage of the bounds to use when determining if the character bounds is inside the area of interest. The possible value are range from 0 to 100 to use when determining if the character bounds is inside the area of interest. The default value is 0 meaning 50.

UseTextZone

Add a text zone during auto-zone. Possible values are:

Value Meaning
TRUE Add a single OCR zone.
FALSE Use intelligent zoning. This is the default value.

Comments

Using an empty rectangle results in area options that is the size of the whole page and therefore, the area of interest is not used. The engine will use only the values of area that intersect with the page dimension.

When performing recognition through L_OcrPage_Recognize or copying page area using L_OcrPage_Copy and the source page contains an area of interest set through L_OcrPage_SetAreaOptions, then the bounds of each recognized OCR character (L_OcrCharacter.Bounds) is checked against Area member and if the character is outside the area then it is ignored and if the character is completely inside the area then it is included.

When only part of the character bounds is included, then the engine will use the value of IntersectPercentage member to decide whether to include the character:

When L_OcrPage_AutoZone is called on a page that has area of interest options set through L_OcrPage_SetAreaOptions, the value of UseTextZone member is used to determine how the engine process the page:

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.