GdPicture.NET Reference Guide
ADRGetLastConfidenceFromTemplate Method (GdPictureImaging)

GdPicture14 Namespace > GdPictureImaging Class : ADRGetLastConfidenceFromTemplate Method
The template ID.
Returns the Confidence from a specific template obtained during the last Documents Recognition Operation.
Public Function ADRGetLastConfidenceFromTemplate( _
   ByVal TemplateID As Integer _
) As Double
public double ADRGetLastConfidenceFromTemplate( 
   int TemplateID
public function ADRGetLastConfidenceFromTemplate( 
    TemplateID: Integer
): Double; 
public function ADRGetLastConfidenceFromTemplate( 
   TemplateID : int
) : double;
public: double ADRGetLastConfidenceFromTemplate( 
   int TemplateID
double ADRGetLastConfidenceFromTemplate( 
   int TemplateID


The template ID.

Return Value

Confidence from specified template. Value between 0 and 100 (identical document).
How to create document templates and identify the confidence of an ADR operation from a certain template
Dim TemplateID1 As Integer, TemplateID2 As Integer
Dim ImageID1 As Integer, ImageID2 As Integer
Dim nCloserTemplate As Integer
Dim Confidence
'We create the first template from an image
TemplateID1 = oGdPictureImaging.ADRCreateTemplateEmpty
ImageID1 = oGdPictureImaging.CreateGdPictureImageFromFile("template1.tif")
If  oGdPictureImaging.ADRAddGdPictureImageToTemplate(TemplateID1, ImageID1) <> OK Then
   MessageBox.Show("Can't add image to TemplateID1 " + "Error number: " + oGdPictureImaging.GetStat().ToString())
End If
'We create the second template from an other kind of image
TemplateID2 = oGdPictureImaging.ADRCreateTemplateEmpty
ImageID2 = oGdPictureImaging.CreateGdPictureImageFromFile("template2.tif")
If  oGdPictureImaging.ADRAddGdPictureImageToTemplate(TemplateID2, ImageID2) <> OK Then
   MessageBox.Show("Can't add image to TemplateID2 " + "Error number: " + oGdPictureImaging.GetStat().ToString())
End If
'Now, we will try to identify an image.
nCloserTemplate = oGdPictureImaging.ADRGetCloserTemplateForFile("document.tif")
Confidence = oGdPictureImaging.ADRGetLastConfidenceFromTemplate(nCloserTemplate)
'Release created templates from memory
oGdPictureImaging.ADRDeleteTemplate (TemplateID1)
oGdPictureImaging.ADRDeleteTemplate (TemplateID2)
See Also


GdPictureImaging Class
GdPictureImaging Members