Automatic handwriting and zone detection
You can add zones automatically or manually. There are two functions available for automatic zone creation. kRecLocateZones is recommended for processing pages with machine-printed text only, lacking any handprinted text, barcode, or other special areas.
To maintain a trivial workflow reading both handprint and machine print on the same page, developers can use the kRecLocateZonesEx function, which automatically detects zones and sets the filling method according to the zone content. Besides machine-printed text, it is able to handle zones with handwritten characters and barcodes. For more information on barcode processing, see the BAR Recognition Engine Module section of the RecAPI Online Help. kRecLocateZonesEx has a bitfield argument describing the different filling methods possibly used on the page, and detects the zones filled with these methods.
kRecLocateZonesEx utilizes the LocateHandwriting module for handprint detection. The module is based on the Deep Neural Network, and works as follows:
- The module separates the original image into two images: a handprinted and a machine-printed one. These images are placed inside the HPAGE.
- The module detects zones on both images. On the handprint image, the kRecLocateHandwriting function itself detects the zones, while on the machine print image, the kRecLocateZones does the same. The filling method (FM) of these zones are set to FM_HANDPRINT and FM_ OMNIFONT, respectively.
- The kRecLocateZones function detects the barcode zones on the machine print image.
- Finally, the module combines all the zones into a single set of zones, and this combined set is made visible to the user as the HPAGE’s zones. The FM field denotes to which image the zone belongs. Zones belonging to other images may overlap, but the zones on the same image may not.
The module places the zones on the HPAGE using the following bits for automatic zone-type detection:
-
LZX_OMNIFONT: machine print zones
-
LZX_BARCODE: barcode zones
-
LZX_HANDPRINT: handprint zones
The number of a zone is determined by the zone type first, then its position in the reading order.
-
KRecLocateZones numbers machine-printed and barcode zones together, assigning the zone numbers according to the reading order.
-
Handprinted zones receive their numbers after all machine-printed and barcode zones. Within that, KRecLocateZones assigns the zone numbers according to the reading order.
The letters in the LETTER array also keep to the above order.