Performs a verification by comparing the two templates supplied.
| Prerequisites | The Fingerprint SDK library must have been previously initialized. |
| Return | On success, GR_MATCH is returned if the matching score is higher than the verification threshold, otherwise GR_NOT_MATCH is returned. On failure, the appropriate error code is returned. |
| [in] queryTemplate |
Query template to be verified. |
| [in] referenceTemplate |
Reference template for verification. |
| [out] verifyScore |
Verification matching score. |
| [in] context |
Context in which the verification will be performed. |
C++ .NET
int Verify(ref byte[] queryTemplate, ref byte[] referenceTemplate, ref int verifyScore, int context)
C#
int Verify(ref Array queryTemplate, ref Array referenceTemplate, ref int verifyScore, int context)
VB6
Function Verify (ByRef queryTemplate() As Byte, ByRef referenceTemplate() As Byte, ByRef verifyScore As Long, ByVal context As Long) As Long
VB .NET
Function Verify (ByRef queryTemplate As Array, ByRef referenceTemplate As Array, ByRef verifyScore As integer, ByVal context As integer) As integer
Delphi
function Verify(var queryTemplate: PSafeArray; var referenceTemplate: PSafeArray; var verifyScore: integer; context: integer): integer;
C++ .NET
C++ .NET:
public class TTemplate
{
// Template data.
public Array _tpt;
// Template size
public int _size; public TTemplate(){
// Create a byte buffer for the template
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
}
}
TTemplate *tptRef;
int result;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Getting the template with the supplied ID from the database.
tptRef = _DB->getTemplate(id);
// Checking if the ID was found.
if ((tptRef->_tpt == NULL) || (tptRef->_size == 0)){
return ERR_INVALID_ID;
}
// Comparing the templates.
result = _grfingerx->Verify(&_tpt->_tpt, &tptRef->_tpt, score, GR_DEFAULT_CONTEXT);
return result;
C#
public class TTemplate
{
// Template data.
public Array _tpt;
// Template size
public int _size;public TTemplate(){
// Create a byte buffer for the template
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
}
}TTemplate tptRef;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;// Getting the template with the supplied ID from the database.
tptRef = _DB.getTemplate(id);// Checking if the ID was found.
if ((tptRef._tpt==null) || (tptRef._size == 0))
{
return ERR_INVALID_ID;
}// Comparing the templates.
return (int) _grfingerx.Verify(ref _tpt._tpt,ref tptRef._tpt,
ref score, (int)GRConstants.GR_DEFAULT_CONTEXT);
VB6
' Template data Type
Public Type TTemplate
' Template data
tpt() As Byte
' Template size
Size As Long
End TypeDim tpt() As Byte
' Checking if the template is valid.
If Not TemplateIsValid() Then
Verify = ERR_INVALID_TEMPLATE
Exit Function
End If
' Getting the template with the supplied ID from the database.
tpt = DB.getTemplate(id)
' Checking if the ID was found.
If UBound(tpt) = 0 Then
Verify = ERR_INVALID_ID
Exit Function
End If
' Comparing the templates.
Verify = GrFingerXCtrl1.Verify(template.tpt, tpt, score, GR_DEFAULT_CONTEXT)
VB .NET
' Template data
Public Class TTemplate
' Template itself
Public tpt(GrFingerXLib.GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte
' Template size
Public Size As Long
End ClassDim ret As integer
Dim tptref As Byte()' Checking if the template is valid.
If Not (TemplateIsValid()) Then Return ERR_INVALID_TEMPLATE
' Getting the template with the supplied ID from the database.
tptref = DB.getTemplate(id)
' Checking if the ID was found.
If tptref.Length = 0 Then Return ERR_INVALID_ID
' Comparing the templates.
Return _GrFingerX.Verify(template.tpt, tptref, score, GRConstants.GR_DEFAULT_CONTEXT)
Delphi
type
// Class TTemplate
// Define a type to temporary storage of template
TTemplate = class
public
// Template data.
tpt: PSafeArray;
// Template size
size: Integer;
// Template ID (if retrieved from DB)
id: Integer;// Allocates space to template
constructor Create;
// clean-up
destructor Destroy; override;
end;Var
ret: integer;
tptRef: TTemplate;
Begin
// Checking if the template is valid.
if not(TemplateIsValid()) then
begin
Verify := ERR_INVALID_TEMPLATE;
exit;
end;
// Getting the template with the supplied ID from the database.
tptRef := DB.getTemplate(id);
if ((tptRef.tpt = nil) or (tptRef.size <= 0)) then
begin
Verify := ERR_INVALID_ID;
exit;
end;
// Comparing the templates.
Verify := GrFingerXCtrl1.Verify(template.tpt, tptRef.tpt, score, GR_DEFAULT_CONTEXT);
end;