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`s 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.
// Processing document
//Saving the results
This approach is helpful once only some particular regions from the document should be recognized.