public FormsRecognitionMethod RecognitionMethod { get; set; }
Public Property RecognitionMethod As FormsRecognitionMethod
public FormsRecognitionMethod getRecognitionMethod();
public void setRecognitionMethod(
FormsRecognitionMethod formsRecognitionMethod
);
public:
property FormsRecognitionMethod RecognitionMethod {
FormsRecognitionMethod get();
void set ( FormsRecognitionMethod );
}
The Leadtools.Forms.Common.FormsRecognitionMethod Method for forms recognition.
Using Simple method Simple has less progress time than Complex but may fail in recognize some forms.
This example adds a page image to an attributes and use Fast compare to find match.
using Leadtools.Forms.Common;
using Leadtools.Forms.Recognition;
using Leadtools.Codecs;
///This method will pass attributes to recognize form.
public FormRecognitionResult CompareFormsWithMastersFast(RasterImage filledFormImage, List<FormRecognitionAttributes> mastersAttributes, FormRecognitionEngine engine)
{
FormRecognitionOptions formOptions = new FormRecognitionOptions();
// We will use Simple (fast) method to create form to use it with CompareFormFast method
formOptions.RecognitionMethod = FormsRecognitionMethod.Simple;
FormRecognitionAttributes filledAttribute = engine.CreateForm(formOptions);
PageRecognitionOptions pageOptions = new PageRecognitionOptions();
pageOptions.AutoCleanUp = true;
pageOptions.UpdateImage = true;
engine.AddFormPage(filledAttribute, filledFormImage, pageOptions);
engine.CloseForm(filledAttribute);
filledAttribute.Image = filledFormImage;
return engine.CompareFormFast(mastersAttributes, filledAttribute, null);
}
Imports Leadtools.Forms.Common
Imports Leadtools.Forms.Recognition
Imports Leadtools.Codecs
'''This method will pass attributes to recognize form.
Public Function CompareFormsWithMastersFast(filledFormImage As RasterImage, mastersAttributes As List(Of FormRecognitionAttributes), engine As FormRecognitionEngine) As FormRecognitionResult
Dim formOptions As New FormRecognitionOptions()
' We will use Simple (fast) method to create form to use it with CompareFormFast method
formOptions.RecognitionMethod = FormsRecognitionMethod.Simple
Dim filledAttribute As FormRecognitionAttributes = engine.CreateForm(formOptions)
Dim pageOptions As New PageRecognitionOptions()
pageOptions.AutoCleanUp = True
pageOptions.UpdateImage = True
engine.AddFormPage(filledAttribute, filledFormImage, pageOptions)
engine.CloseForm(filledAttribute)
filledAttribute.Image = filledFormImage
Return engine.CompareFormFast(mastersAttributes, filledAttribute, Nothing)
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