Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.10
|
Leadtools.Forms.Recognition Namespace > FormRecognitionEngine Class : CompareFormFast Method |
public FormRecognitionResult CompareFormFast( List<FormRecognitionAttributes> mastersAttributes, FormRecognitionAttributes formAttributes, FormProgressCallback formCallback )
'Declaration Public Function CompareFormFast( _ ByVal mastersAttributes As List(Of FormRecognitionAttributes), _ ByVal formAttributes As FormRecognitionAttributes, _ ByVal formCallback As FormProgressCallback _ ) As FormRecognitionResult
'Usage Dim instance As FormRecognitionEngine Dim mastersAttributes As List(Of FormRecognitionAttributes) Dim formAttributes As FormRecognitionAttributes Dim formCallback As FormProgressCallback Dim value As FormRecognitionResult value = instance.CompareFormFast(mastersAttributes, formAttributes, formCallback)
In a case that the number of pages in unKnown of the Form, such as scanner loaded with different forms, it is preferable to use ComparePage(FormRecognitionAttributes,Int32,FormRecognitionAttributes,Int32) to compare it with the first page of each Master Form then use GetFormProperties to get the number of pages of the Master Form then update your Form attributes with the required pages if needed for processing.
In order to recognize a Form, the Form attribute object must be compared with all of the Master Form attribute objects (contained in the list passed to this function) representing different types of form templates. The Form's type is that Master Form attribute object that generated the highest confidence value. If the highest confidence value is very low that means the Form is not one the types of the Master Forms (i.e. the type of this Form is not defined in the Master Form set)
For a complete example of using form recognition and processing, refer to the FormRecognitionEngine example.
This example compares a Master Form with a Form.
Imports Leadtools Imports Leadtools.Barcode Imports Leadtools.Codecs Imports Leadtools.Forms Imports Leadtools.Forms.Ocr Imports Leadtools.Forms.Processing Imports Leadtools.Forms.Recognition Imports Leadtools.Forms.Recognition.Barcode Imports Leadtools.Forms.Recognition.Ocr '''This method compares a Form to a List of Master Form Public Function CompareFormFast(page As RasterImage, formAttributes As FormRecognitionAttributes, mastersAttributes As List(Of FormRecognitionAttributes), engine As FormRecognitionEngine) As FormRecognitionResult formAttributes.Image = page Return engine.CompareFormFast(mastersAttributes, formAttributes, Nothing) End Function
using Leadtools; using Leadtools.Barcode; using Leadtools.Codecs; using Leadtools.Forms; using Leadtools.Forms.Ocr; using Leadtools.Forms.Processing; using Leadtools.Forms.Recognition; using Leadtools.Forms.Recognition.Barcode; using Leadtools.Forms.Recognition.Ocr; ///This method compares a Form to a List of Master Form. public FormRecognitionResult CompareFormFast(RasterImage page, FormRecognitionAttributes formAttributes, List<FormRecognitionAttributes> mastersAttributes, FormRecognitionEngine engine) { formAttributes.Image = page; return engine.CompareFormFast(mastersAttributes, formAttributes, null); }