ADRGetLastRelevance Method

See Also     Examples     Applies To

Returns the relevance of the closest template obtained during the last operation of documents recognition.

Syntax

object.ADRGetLastRelevance ()

The ADRGetLastRelevance syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.

Returns

Double. Last relevance. Value between 0 and 100 (identical document).

Category

Automatic Document Recognition Functions

Visual Basic Sample

How to create document templates and identify the one which have the closer similar content than an image file.


Dim nTemplateID1 As Long, nTemplateID2 As Long
Dim nCloserTemplate As Long

'We create the first template from an image
nTemplateID1 = Object.ADRCreateTemplateFromFile("template1.tif")
If nTemplateID1 = 0 Then
   MsgBox "Can't create nTemplateID1 " + "Error number: " + str(Object.GetStat)
End If

'We create the second template from an other kind of image
nTemplateID2 = Object.ADRCreateTemplateFromFile("template2.tif")
If nTemplateID2 = 0 Then
   MsgBox "Can't create nTemplateID2 " + "Error number: " + str(Object.GetStat)
End If


'Now, we will try to identify an image.
nCloserTemplate = Object.ADRGetCloserTemplateForFile("document.tif")

Select Case nCloserTemplate
       Case nTemplateID1
            MsgBox "This image seems to get best similar content as nTemplateID1. Relevance is: " + str(Object.ADRGetLastRelevance) + " %"
       Case nTemplateID2
            MsgBox "This image seems to get best similar content as nTemplateID2. Relevance is: " + str(Object.ADRGetLastRelevance) + " %"
End Select


'Release created templates from memory
Object.ADRDeleteTemplate (nTemplateID1)
Object.ADRDeleteTemplate (nTemplateID2)






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.