public PageRecognitionResult ComparePage(
FormRecognitionAttributes masterAttributes,
int masterPageNumber,
FormRecognitionAttributes formAttributes,
int formPageNumber
)
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.
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 (the Master Form attribute object would not have the text features of the Form object).
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;
}