A zone is a rectangular area in the image, up to full size, containing a feature of interest to the user. The image data covered by each zone is handled and processed (and typically recognized) separately, according to zone-specific parameters. The zones of an ImGearOCR Class image form a list, the zone list, which is attached to the image. The zone list can be examined at any time with the Zones Property of ImGearOCRPage Class.
Zones can be added to a given image (to the zone list of the image, to be precise) in three different ways:
- Manually
- From a File
- Automatically
Manually
In addition to, or instead of the automatic zone search, you can program your own zones by specifying the zone coordinates. For adding zones to the zone list manually, the application calls the Add Method of ImGearOCRZoneCollection Class. Related methods are: Insert Method, Remove Method, RemoveAt Method, and Clear Method.
From a File
The second way of creating zones is by reading zones from a 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 ImGearOCRZoneCollection.SaveToFile Method. The application can load them from a zone file with the LoadFromFile Method.
When a zone file is loaded, any previous zones on the image are removed.
If the application calls the ImGearOCRPage.Recognize Method on an image with an empty zone list, then full page recognition is performed.
Automatically
The automatic page-layout decomposition process (auto-zoning) can be activated directly by calling the ImGearOCRPage.LocateZones Method for finding text blocks on the image. It creates an entire zone list for the given image.
The LocateZones Method has an overload that takes an ImGearRectangle as a parameter. This rectangle serves to limit the area of the image inside which zones will be searched and defined.
When automatic zone location is performed, any previous zones on the image are removed.