How to recognize a region of an image with FineReader Engine 12


How to recognize a region of an image with FineReader Engine 12?


There is AddRect Method of the Region Object that allows defining a new block area. It has the following parameters:
Left [in] - specifies coordinate of the left border of the area.
Top [in] - specifies coordinate of the top border of the area.
Right [in] - specifies coordinate of the right border of the area.
Bottom [in] - specifies coordinate of the bottom border of the area.

The values are in pixels. The coordinates are specified relative to the page edges. So the appropriate drawing is next:


It is implied that we already have the document object created and an image loaded. The C# code snippet that demonstrates general idea:

// Remove all the blocks from the collection

// Create region and specify its coordinates
IRegion region = engineLoader.Engine.CreateRegion();
region.AddRect(Left, Top, Right, Bottom);
// Add blocks of required type to the layout of the first page.
//It is required to replace BT_Type with the appropriate BlockTypeEnum enumeration.
document.Pages[0].Layout.Blocks.AddNew(BlockTypeEnum.BT_Type, region);
// Processing document
//Saving the results

This approach is helpful once only some particular regions from the document should be recognized.

Have more questions? Submit a request



Please sign in to leave a comment.