Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.10
|
Leadtools.Forms.Recognition Namespace > FormRecognitionOptions Class : RecognitionMethod Property |
public FormsRecognitionMethod RecognitionMethod {get; set;}
'Declaration Public Property RecognitionMethod As FormsRecognitionMethod
'Usage Dim instance As FormRecognitionOptions Dim value As FormsRecognitionMethod instance.RecognitionMethod = value value = instance.RecognitionMethod
public: property FormsRecognitionMethod RecognitionMethod { FormsRecognitionMethod get(); void set ( FormsRecognitionMethod value); }
This example adds a page image to an attributes and use Fast compare to find match.
Imports Leadtools.Forms 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
using Leadtools.Forms; 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); }