ImageGear for .NET
Example: Defining a Zone Manually

The following example contains uppercase letters only for multi-lingual omnifont recognition.

C#
Copy Code
ImGearRecZone igRecZone = new ImGearRecZone();
igRecZone.Rect.Left = 739;
igRecZone.Rect.Top = 63;
igRecZone.Rect.Right = 1729;
igRecZone.Rect.Bottom = 114;
// textual zone: it contains flowed text
igRecZone.Type = ImGearRecZoneType.FLOW;
// Omnifont filling method was used to fill the zone's area
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT;
// MOR recognition module will be applied for the zone's area
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR;
// Character Set: only uppercase letters
igRecZone.Filter = ImGearRecFilter.UPPERCASE;
// Add the zone to the zone list
igRecPage.Zones.Add(igRecZone);
igRecPage.Zones.SaveToFile("SAMPLE.ZON");
MessageBox.Show("Number of Zones: " + igRecPage.Zones.Count);
VB .NET
Copy Code
Dim igRecZone As New ImGearRecZone()
igRecZone.Rect.Left = 739
igRecZone.Rect.Top = 63
igRecZone.Rect.Right = 1729
igRecZone.Rect.Bottom = 114
' textual zone: it contains flowed text
igRecZone.Type = ImGearRecZoneType.FLOW
' Omnifont filling method was used to fill the zone's area
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT
' MOR recognition module will be applied for the zone's area
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR
' Character Set: only uppercase letters
igRecZone.Filter = ImGearRecFilter.UPPERCASE
' Add the zone to the zone list
igRecPage.Zones.Add(igRecZone)
igRecPage.Zones.SaveToFile("SAMPLE.ZON")
MessageBox.Show("Number of Zones: " + igRecPage.Zones.Count.ToString())

To get information about any particular zone of the zone list of the image, the application can access the zone list via the Zones Property of ImGearRecPage Class. This can be useful in finding out more about the zones created by the auto-zoning method.

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback