ImageGear for C and C++ on Windows v19.1 - Updated
Add Zones
User Guide > How to Work with... > OCR > How to... > Prepare the Input > Work with Zones > Add Zones

Zones can be added to a given image (to the zone list of the image, to be precise) in three different ways:

Automatically

The automatic page-layout decomposition process (auto-zoning) can be activated directly by calling the IG_REC_zones_locate() function for finding text blocks on the image. It creates an entire zone list for the given image.

The IG_REC_zones_locate() function has a parameter that points to a structure containing the active area. This rectangle serves to limit the area inside which zones will be searched and defined.

The Capture SDK offers four different algorithms to be applied during auto-zoning: use the IG_REC_decomp_method_set() function to specify which Page parser algorithm setting should be applied during auto-zoning. Choose between the following enumIGRecDecompMethod constants:

When auto-zoning is used, each resulting zone is initialized with the following:

All zones created by this function will have the following:

Any zone can be locally overridden with the IG_REC_zone_info_set() function, which allows you to change the attributes of a zone in the zone list.

Manually

In addition to, or instead of, the automatic zone search, you can program your own zones by specifying the zone coordinates and zone attributes. For adding zones to the zone list manually, the application calls the IG_REC_zone_insert() function. Related functions are: IG_REC_zone_delete(), IG_REC_zones_delete_all(), and IG_REC_zone_info_set().

From a File

You can create zones by reading them from a storage file (called a zone file) that contains the attributes of previously saved zones. An application can save the current zone definitions to a zone file any time with the IG_REC_zones_save() function. The application can load them from a zone file with the IG_REC_zones_load() function.

When a zone file is loaded, any previous zones on the image are removed.

If the application calls the IG_REC_image_recognize() recognizing function on an image with an empty zone list, the page-layout decomposition function is called automatically.