Returns a PageRecognitionResult object that describes how close the specified Form page is in comparison to the specified Master Form page.
Syntax
public PageRecognitionResult ComparePage(
FormRecognitionAttributes masterAttributes,
int masterPageNumber,
FormRecognitionAttributes formAttributes,
int formPageNumber,
PageProgressCallback callback
)
Public Overloads Function ComparePage( _
ByVal masterAttributes As FormRecognitionAttributes, _
ByVal masterPageNumber As Integer, _
ByVal formAttributes As FormRecognitionAttributes, _
ByVal formPageNumber As Integer, _
ByVal callback As PageProgressCallback _
) As PageRecognitionResult
public PageRecognitionResult comparePage(
FormRecognitionAttributes masterAttributes,
int masterPageNumber,
FormRecognitionAttributes formAttributes,
int formPageNumber,
PageProgressCallback callback
);
public:
PageRecognitionResult^ ComparePage(
FormRecognitionAttributes^ masterAttributes,
int masterPageNumber,
FormRecognitionAttributes^ formAttributes,
int formPageNumber,
PageProgressCallback^ callback
)
masterAttributes
The attributes of the Master Form.
masterPageNumber
The reference Master Form page. The page number is a 1-based index.
formAttributes
The Form attributes object.
formPageNumber
The page of the form being aligned. The page number is a 1-based index.
callback
Optional callback to show operation progress.
Comparisons should be made between two attribute sets that have been generated using the Default Manager Objects. For example, if the Master Form attribute object was generated using the BarcodeManager and the Form attribute object was generated using the OcrManager, then the Form will not be recognized since the Master Form attribute object does not have the text features the Form has.
For a complete example of using form recognition and processing, refer to the FormRecognitionEngine example.
This example adds a page to the form
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 the first page of a Form to the first page of a Master Form.
FormRecognitionResult CompareFirstPage(FormRecognitionEngine recognitionEngine,
FormRecognitionAttributes master,
FormRecognitionAttributes form)
{
PageRecognitionResult resultPage = recognitionEngine.ComparePage(master, 1, form, 1);
FormRecognitionResult result = new FormRecognitionResult();
result.Confidence = resultPage.Confidence;
result.LargestConfidencePageNumber = 1;
result.PageResults.Add(resultPage);
result.Reason = FormRecognitionReason.Success;
return result;
}
Imports Leadtools
Imports Leadtools.Barcode
Imports Leadtools.Codecs
Imports Leadtools.Forms.Common
Imports Leadtools.Ocr
Imports Leadtools.Forms.Processing
Imports Leadtools.Forms.Recognition
Imports Leadtools.Forms.Recognition.Barcode
Imports Leadtools.Forms.Recognition.Ocr
'''This method compares the first page of a Form to the first page of a Master Form.
Private Function CompareFirstPage(recognitionEngine As FormRecognitionEngine, master As FormRecognitionAttributes, form As FormRecognitionAttributes) As FormRecognitionResult
Dim resultPage As PageRecognitionResult = recognitionEngine.ComparePage(master, 1, form, 1)
Dim result As New FormRecognitionResult()
result.Confidence = resultPage.Confidence
result.LargestConfidencePageNumber = 1
result.PageResults.Add(resultPage)
result.Reason = FormRecognitionReason.Success
Return result
End Function
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.