←Select platform

CompareFormFast Method

Summary
Returns a FormRecognitionResult object determines how close is the specified Form to the specified Master Form.

Syntax
C#
C++/CLI
Java
Python
public: 
FormRecognitionResult^ CompareFormFast(  
   List<FormRecognitionAttributes^>^ mastersAttributes, 
   FormRecognitionAttributes^ formAttributes, 
   FormProgressCallback^ formCallback 
)  
def CompareFormFast(self,mastersAttributes,formAttributes,formCallback): 

Parameters

mastersAttributes
List of all Master Forms attribute objects that you want to compare with.

formAttributes
The Form attribute object.

formCallback
Status about the progress of the comparison at the form level (i.e. page by page). Set it to null to ignore the progress.

Remarks

The Master Forms and the Form must have the same number of pages. If they do not, the result will be zero and the reason will be FormRecognitionReason.InvalidNumberOfPages. 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)

Example

This example compares a Master Form with a Form.

C#
using Leadtools; 
using Leadtools.Barcode; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.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); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.Recognition Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.