Working with Zones

Once the desired language(s) have been activated, the user can create zones within the page(s) to be recognized. Zones are optional. A page does not have to have zones in order to be recognized. An OCR document may have a single page or multiple pages. Zones can be added to pages as follows:

1.

Manually: This is done by adding one or more zones to a specific OCR page using L_DocAddZone.

2.

Automatically: All zones on a specific page can be found by calling L_DocFindZones. This function runs an algorithm that automatically determines the zones for the page and adds the zones it finds to the OCR document page. The options that control the algorithm used by this function can be set using L_DocSetZoneOptions. These options should be set before calling L_DocFindZones. To determine the current options for the algorithm used for automatically determining the zones of a page, call L_DocGetZoneOptions.

General Zone functions:

LEADTOOLS provides other function s that can be used with zones, regardless of how the zones were created. L_DocGetZoneCount gets the total number of zones in the zone list for the specified OCR page, while L_DocGetZone gets general zone information for a specific zone in a specific OCR page.

The zone list for a specific page may be saved to a file for later use, or for use with a different OCR document. To save a zone list to a file, call L_DocExportZones. To import a zone list that has been saved using L_DocExportZones, call L_DocImportZones.

To update the zone data of a single zone in the zone list of a specific page, call L_DocUpdateZone.

Finally, a zone may be removed from a zone list for a specific page by calling L_DocRemoveZone.

If the host PC has two processors or a hyper-threaded one, using the Parallel Recognition Mode can speed up the recognition process by allowing the two recognition engines to run in parallel. The Parallel Recognition Mode may be used when a zone is associated with any of the following recognition modules: RECOGMODULE_MTEXT_OMNIFONT, RECOGMODULE_OMNIFONT_FRX, or RECOGMODULE_OMNIFONT_PLUS3W. To determine whether the Parallel Recognition Mode is enabled, call L_DocIsParallelRecognitionEnabled. To enable or disable the Parallel Recognition Mode, call L_DocEnableParallelRecognition.