- masterAttributes
- The Master Form attributes object.
- formAttributes
- The Form attributes object.
- formCallback
- Provides status on the progress of the comparison on the form level (i.e. page by page). Set it to null to ignore the progress.
- pageCallback
- Provides status on the progress of the comparison on th epage level. Set it to null to ignore the progress.
Visual Basic (Declaration) | |
---|---|
Overloads Public Function CompareForm( _ ByVal masterAttributes As FormRecognitionAttributes, _ ByVal formAttributes As FormRecognitionAttributes, _ ByVal formCallback As FormProgressCallback, _ ByVal pageCallback As PageProgressCallback _ ) As FormRecognitionResult |
Visual Basic (Usage) | Copy Code |
---|---|
|
C++/CLI | |
---|---|
public: FormRecognitionResult^ CompareForm( FormRecognitionAttributes^ masterAttributes, FormRecognitionAttributes^ formAttributes, FormProgressCallback formCallback, PageProgressCallback pageCallback ) |
Parameters
- masterAttributes
- The Master Form attributes object.
- formAttributes
- The Form attributes object.
- formCallback
- Provides status on the progress of the comparison on the form level (i.e. page by page). Set it to null to ignore the progress.
- pageCallback
- Provides status on the progress of the comparison on th epage level. Set it to null to ignore the progress.
For a complete example on using the forms recognition and processing, refer to the FormRecognitionEngine example.
This example compares a Master Form with a Form.
Visual Basic | Copy Code |
---|---|
'''This method compares a Form to a Master Form using all pages. |
C# | Copy Code |
---|---|
///This method compares a Form to a Master Form using all pages. |
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 FormRecognitionEngine.ComparePage(FormRecognitionAttributes,Int32,FormRecognitionAttributes,Int32) to compare it with the first page of each Master Form then use FormRecognitionEngine.GetFormProperties to get the number of pages of the Master Form then update your Form attributes with the requiered pages if needed for processing.
Comparison should be done between two attributes that has been generated using the same Default Manager Objects, for example if the Master Form attributes has been generated using the BarcodeManager and the Form attributes has been generated using the OcrManager then the Form will not be recognized since the Master Form attributes do not have the text features of the Form.
In order to recognize a Form, the Form attributes must be comapred with all Master Forms attributes that represent the different types of form templates. The Form type is the type of the Master Form attributes that has generated the highest confidence value. If the highest confidence value is very low taht 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 Forms set)
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family