Performs auto decomposition of the page to find the text and graphics zones using specified parameters.
public void NativeAutoZone(
Sub NativeAutoZone( _
ByVal zoneParser As Leadtools.Ocr.NativeOcrZoneParser, _
ByVal fillMethod As Leadtools.Ocr.NativeOcrZoneFillMethod, _
ByVal callback As Leadtools.Ocr.OcrProgressCallback _
public void nativeAutoZone(NativeOcrZoneParser zoneParser,
The parser used for auto zoning.
Note: This parameter will always contain NativeOcrZoneParser.Default when using the LEADTOOLS OCR Module - LEAD Engine.
The fill method used in the zones found.
Optional callback to show operation progress.
This method differs from AutoZone as follows:
This method finds the zone coordinates (NativeOcrZone.Bounds) and type (NativeOcrZone.ZoneType). The type of the zone determines the role of the zone in the page layout and can be classified into three different groups:
The flowed text zone types: NativeOcrZoneType.Text, NativeOcrZoneType.Column, NativeOcrZoneType.Header, NativeOcrZoneType.Footer, NativeOcrZoneType.Caption, NativeOcrZoneType.Title, NativeOcrZoneType.VerticalText, NativeOcrZoneType.LeftRotatedText, NativeOcrZoneType.RightRotatedText and NativeOcrZoneType.Other. These types mean that the zone contains textual information without a table type structure inside (it is flowed text). These types listed above are considered the same, they will not be differentiated from each other during the later processing stages.
Note: Only NativeOcrZoneType.Text is currently supported for the LEADTOOLS OCR Module - LEAD Engine.
The NativeOcrZoneType.Table type. A zone having this type means that the zone is detected as containing a table, i.e. with columns, with or without a grid. Such zones will be handled differently from those of flowed text type zones.
The new zones found by this method will always have the NativeOcrZone.FillMethod and NativeOcrZone.RecognitionModule set to fillMethod and NativeOcrZoneRecognitionModule.Auto respectively. In order to override this automatic fill method and recognition module, you must update each zone in Zones by getting the zone with the IOcrZoneCollection getter, update and set it back with the setter. You can get the number of zones found by this method with the Zones.Count property.
To detect the global fill method of a page, use DetectNativeFillMethod.
Note: If this IOcrPage is an empty page, in other words, when the OCR engine performs automatic page decomposing with the AutoZone method and could not find any zones in it, the Recognize method will fail with an exception. It is recommended you call AutoZone and then check if there is at least one zone found by the engine (using Zones.Count). If the count is zero, do not call Recognize.
If a recognition module is not able to recognize an object (i.e. character, or checkmark etc.), this object will be marked as a rejected one. It will become marked by a rejection symbol during conversion to the final output document. Note that IOcrDocumentManager.RejectionSymbol can be set to specify the rejection symbol used in the final document.
Note on AutoZone/Recognize and the page image: In certain cases, AutoZone and Recognize will perform image processing on the page that might result in the page being manipulated. For example, if you add a zone of type table, the engine might automatically deskew the page if required. This result in the image representation of the image to be different after AutoZone or Recognize is called. If your application has a requirement to view the image of the page, then call GetRasterImage after AutoZone or Recognize to get the latest version of the image representation of the page in case it has changed. The LEADTOOLS Main OCR C# and VB demos do exactly that.