LEADTOOLS Forms (Leadtools.Forms.Recognition assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
Confidence Property
See Also 
Leadtools.Forms.Recognition Namespace > FormRecognitionResult Class : Confidence Property



The Confidence Property is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

Gets or sets the level of confidence that a recognition engine has when comparing a Form's attributes object with a Master Form's attributes object.

Syntax

Visual Basic (Declaration) 
Public Property Confidence As Integer
Visual Basic (Usage)Copy Code
Dim instance As FormRecognitionResult
Dim value As Integer
 
instance.Confidence = value
 
value = instance.Confidence
C# 
public int Confidence {get; set;}
C++/CLI 
public:
property int Confidence {
   int get();
   void set (    int value);
}

Property Value

The confidence number expresses the certainty of the recognition process.

Example

For a complete example on using the forms recognition and processing, refer to the FormRecognitionEngine example.

This example finds the maximum confidence of the comparison with Master Forms.

Visual BasicCopy Code
'''This method identifies the type of the form based on the comparison results.
Public Function IdentefyForm(ByVal results As FormRecognitionResult()) As Integer
   Dim maxIndex As Integer = 0
   maxIndex = 0
   Dim i As Integer = 1
   Do While i < results.Length
      If results(maxIndex).Confidence < results(i).Confidence Then
         maxIndex = i
      End If
      i += 1
   Loop
   If results(maxIndex).Confidence < 30 Then
      maxIndex = -1 'no match
   End If
   Return maxIndex
End Function
C#Copy Code
///This method identifies the type of the form based on the comparison results.
public int IdentefyForm(FormRecognitionResult[] results)
{
   int maxIndex = 0;
   maxIndex = 0;
   for(int i = 1; i < results.Length; i++)
   {
      if(results[maxIndex].Confidence < results[i].Confidence)
         maxIndex = i;
   }
   if(results[maxIndex].Confidence < 30)
      maxIndex = -1;//no match
   return maxIndex;
}

Remarks

Confidence values range from 0 to 100. 0 represents no confidence, 100 represents full confidence. The Confidence value is the average confidence of all pages in multi-page forms.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features