Working with Zones

After activating the desired language(s), it is possible to create zones to be recognized within the page(s).

Zones are optional. A page does not have to have zones in order to be recognized. Zones can be added to pages manually or automatically.

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 can be used when a zone is associated with any of the following recognition modules: DOC2_RECOGMODULE_MTEXT_OMNIFONT, DOC2_RECOGMODULE_OMNIFONT_FRX, or DOC2_RECOGMODULE_OMNIFONT_PLUS3W.

LEADTOOLS OCR Module - OmniPage Engine

Manually add one or more zones to a specific OCR page using L_Doc2AddZone / L_Doc2AddZoneExt.

Automatically find all zones on a specific page by calling L_Doc2FindZones / L_Doc2FindZonesExt. It 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_Doc2SetZoneOptions / L_Doc2GetZoneOptionsExt. Be sure to set the options before calling L_Doc2FindZones. To determine the current options for the algorithm used for automatically determining the zones of a page, call L_Doc2GetZoneOptions / L_Doc2GetZoneOptionsExt.

General Zone Functions

LEADTOOLS provides other functions that can be used with zones, regardless of how the zones were created. L_Doc2GetZoneCount / L_Doc2GetZoneCountExt gets the total number of OCR and user zones in the zone list for the specified OCR page, while L_Doc2GetZone / L_Doc2GetZoneExt gets general zone information for a specific zone in a specific OCR page. Also, call L_Doc2GetZoneColor / L_Doc2GetZoneColorExt to get the zone's color.

The zone list for a specific page can 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_Doc2ExportZones / L_Doc2ExportZonesExt. To import a zone list that has been saved using L_Doc2ExportZones, call L_Doc2ImportZones / L_Doc2ImportZonesExt.

To update the zone data of a single zone in the zone list of a specific page, call L_Doc2UpdateZone / L_Doc2UpdateZoneExt.

Finally, remove a zone from a zone list for a specific page by calling L_Doc2RemoveZone / L_Doc2RemoveZoneExt.

Pizzabox Shaped Zones

A pizzabox shape is a union of rectangles, where the top of each rectangle in the union must touch the bottom of the rectangle above it. A rectangle can touch at most one rectangle above and one below. The following zones cannot have a pizzabox shape:

To create a pizzabox zone, add a rectangle to a user zone by calling L_Doc2AddZoneRect / L_Doc2AddZoneRectExt. To subtract a rectangle from a pizzabox zone, call L_Doc2ExcludeZoneRect / L_Doc2ExcludeZoneRectExt. To get the pizzabox points (nodes), call L_Doc2GetZoneNodes / L_Doc2GetZoneNodesExt.

To get pizzabox zone rectangles (zone layout), call L_Doc2GetZoneLayout / L_Doc2GetZoneLayoutExt. To set one or more rectangles into a pizzabox zone, call L_Doc2SetZoneLayout / L_Doc2SetZoneLayoutExt.

For more information refer to:

An Overview of Recognition Modules

Recognizing Multiple Documents

Recognizing Document Pages

Drawing Pages and Zones

Working with Pages

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.