Declaration
C++ .NETint 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;
Sample Code
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];_size = 0;
// 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; _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 Dim 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 Class
Dim 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
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;
IdentifyPrepare
Prepares a query template to be identified against one or more reference templates.
Prerequisites The Fingerprint SDK library must have been previously initialized.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[in] templateQuery Query template to be identified.
[in] context Context in which the identification will be performed.
Declaration
C++ .NETint IdentifyPrepare (ref byte[] templateQuery, int context) C#
int IdentifyPrepare (ref Array templateQuery, int context) VB6
Function IdentifyPrepare (ByRef templateQuery() As Byte, ByVal context As Long) As Long VB .NET
Function IdentifyPrepare (ByRef templateQuery() As Array, ByVal context As integer) As integer Delphi
function IdentifyPrepare(var templateQuery: PSafeArray; context: integer): integer;
Sample Code
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];_size = 0;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting the identification process and supplying the query template.
result = _grfingerx->IdentifyPrepare(&_tpt->_tpt, GR_DEFAULT_CONTEXT);
// error?
if(result < 0) return result;
// Getting the current template from the recordset.
tptRef = _DB->getTemplate(rs);
// Comparing the current template.
result = _grfingerx->Identify(&tptRef->_tpt, &score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if(result == GR_MATCH){
id = _DB->getId(rs);
rs->Close();
return id;
}
else if (result < 0){
rs->Close();
return result;
} _tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting the identification process and supplying the query //template.
result = (GRConstants) _grfingerx.IdentifyPrepare(ref _tpt._tpt, (int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting the current template from the recordset.
tptRef = _DB->getTemplate(rs);
// Comparing the current template.
result = _grfingerx->Identify(&tptRef->_tpt, &score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if(result == GR_MATCH){
return result;
}
VB6
' Template data Type Public Type TTemplate Dim ret As integer Dim i As integer
' Starting the identification process and supplying the query 'template.
If Not TemplateIsValid() Then Identify = ERR_INVALID_TEMPLATE Exit Function
End If
' Starting the identification process and supplying the query 'template.
ret = GrFingerXCtrl1.IdentifyPrepare(template.tpt, GR_DEFAULT_CONTEXT) ' error?
If ret < 0 Then Identify = ret Exit Function End If
' Getting the current template from the recordset.
tpt = rs("template")
' Comparing the current template.
ret = GrFingerXCtrl1.Identify(tpt, score, GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match.
If ret = GR_MATCH Then Identify = rs("ID") rs.Close Exit Function ElseIf ret < 0 Then Identify = ret
Public tpt(GrFingerXLib.GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte ' Template size
Public Size As Long End Class
Dim ret As integer Dim i As integer
' Checking if the template is valid.
If Not TemplateIsValid() Then Return ERR_INVALID_TEMPLATE
' Starting the identification process and supplying the query template.
ret = _GrFingerX.IdentifyPrepare(template.tpt, GRConstants.GR_DEFAULT_CONTEXT) ' error?
If ret < 0 Then Return ret ' Comparing the current template.
ret = _GrFingerX.Identify(templates(i).template.tpt, score, GRConstants.GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match.
If ret = GRConstants.GR_MATCH Then Return templates(i).ID End If
If ret < 0 Then Return ret
Delphi type
// Class TTemplate
// Define a type to temporary storage of template TTemplate = class
// Checking if the template is valid.
if not(TemplateIsValid())then begin
Identify := ERR_INVALID_TEMPLATE;
exit;
end;
// Starting the identification process and supplying the query //template.
ret := GrFingerXCtrl1.IdentifyPrepare(template.tpt, GR_DEFAULT_CONTEXT);
// error?
if (ret < 0) then begin identify := ret;
exit;
end;
// Comparing the current template.
ret := GrFingerXCtrl1.Identify(tptRef.tpt, score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if (ret = GR_MATCH) then begin
Identify := tptRef.id;
exit;
end
else if (ret < 0) then
Performs an identification by comparing the supplied reference template against the previously prepared query template.
Prerequisites The Fingerprint SDK library must have been previously initialized.
The identification must be previously prepared by calling the IdentifyPrepare method.
The Verify method must not be called beween the call to IdentifyPrepare method and a call to Identify method.
Return On success, GR_MATCH is returned if the matching score is higher than the identification threshold, otherwise GR_NOT_MATCH is returned.On failure, the appropriate error code is returned.
Parameters
[in] templateReference Reference template for identification.
[out] identifyScore Identification matching score.
[in] context Context in which the identification will be performed.
See also
Return codesDeclaration
C++ .NETint Identify (ref byte[] templateReference, ref int identifyScore, int context) C#
int Identify (ref Array templateReference, ref int identifyScore, int context) VB6
Function Identify (ByRef templateReference() As Byte, ByRef identifyScore As Long, ByVal context As Long) As Long VB .NET
Function Identify (ByRef templateReference As Array, ByRef identifyScore As integer, ByVal context As integer) As integer Delphi
function Identify(var templateReference: PSafeArray; var identifyScore: integer; context: integer): integer;
Sample Code
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];_size = 0;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting the identification process and supplying the query template.
result = _grfingerx->IdentifyPrepare(&_tpt->_tpt, GR_DEFAULT_CONTEXT);
// error?
if(result < 0) return result;
// Getting the current template from the recordset.
tptRef = _DB->getTemplate(rs);
// Comparing the current template.
result = _grfingerx->Identify(&tptRef->_tpt, &score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if(result == GR_MATCH){
return result;
} _tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
// Checking if the template is valid.
if(!TemplateIsValid()) return ERR_INVALID_TEMPLATE;
// Starting the identification process and supplying the query //template.
result = (GRConstants) _grfingerx.IdentifyPrepare(ref _tpt._tpt, (int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if (result < 0) return (int)result;
// Getting the current template from the recordset.
tptRef = _DB->getTemplate(rs);
// Comparing the current template.
result = _grfingerx->Identify(&tptRef->_tpt, &score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if(result == GR_MATCH){
return result;
}
VB6
' Template data Type Public Type TTemplate Dim ret As integer Dim i As integer
' Starting the identification process and supplying the query 'template.
If Not TemplateIsValid() Then Identify = ERR_INVALID_TEMPLATE Exit Function
End If
' Starting the identification process and supplying the query 'template.
ret = GrFingerXCtrl1.IdentifyPrepare(template.tpt, GR_DEFAULT_CONTEXT) ' error?
If ret < 0 Then Identify = ret Exit Function End If
' Getting the current template from the recordset.
tpt = rs("template")
' Comparing the current template.
ret = GrFingerXCtrl1.Identify(tpt, score, GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match.
If ret = GR_MATCH Then Identify = rs("ID") rs.Close Exit Function ElseIf ret < 0 Then Identify = ret
Public tpt(GrFingerXLib.GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte ' Template size
Public Size As Long End Class
Dim ret As integer Dim i As integer
' Checking if the template is valid.
If Not TemplateIsValid() Then Return ERR_INVALID_TEMPLATE
' Starting the identification process and supplying the query template.
ret = _GrFingerX.IdentifyPrepare(template.tpt, GRConstants.GR_DEFAULT_CONTEXT) ' error?
If ret < 0 Then Return ret ' Comparing the current template.
ret = _GrFingerX.Identify(templates(i).template.tpt, score, GRConstants.GR_DEFAULT_CONTEXT) ' Checking if the query template and the reference template match.
If ret = GRConstants.GR_MATCH Then Return templates(i).ID End If
If ret < 0 Then Return ret
Delphi
type // Class TTemplate
// Define a type to temporary storage of template TTemplate = class
// Checking if the template is valid.
if not(TemplateIsValid())then begin
Identify := ERR_INVALID_TEMPLATE;
exit;
end;
// Starting the identification process and supplying the query //template.
ret := GrFingerXCtrl1.IdentifyPrepare(template.tpt, GR_DEFAULT_CONTEXT);
// error?
if (ret < 0) then begin identify := ret;
exit;
end;
// Comparing the current template.
ret := GrFingerXCtrl1.Identify(tptRef.tpt, score, GR_DEFAULT_CONTEXT);
// Checking if the query template and the reference template match.
if (ret = GR_MATCH) then begin
Sets the identification parameters in the supplied context.
Prerequisites The Fingerprint SDK library must have been previously initialized.
Return
On success, GR_OK is returned.
If any supplied parameter is invalid or out of range, its default value will be used and GR_DEFAULT_USED is returned.
On failure, the appropriate error code is returned.
Parameters
[in] identifyThreshold The identification score threshold.
[in] identifyRotationTolerance The rotation tolerance for the identification process.
[in] context Context in which the identification parameters will be set.
See also
Matching constants Context constants
Declaration
C++ .NETint SetIdentifyParameters (int identifyThreshold, int identifyRotationTolerance, int context) C#
int SetIdentifyParameters (int identifyThreshold, int identifyRotationTolerance, int context) VB6
Function SetIdentifyParameters (ByVal identifyThreshold As Long, ByVal identifyRotationTolerance As Long, ByVal context As Long) As Long VB .NET
Function SetIdentifyParameters (ByVal identifyThreshold As integer, ByVal identifyRotationTolerance As integer, ByVal context As integer) As integer Delphi
function SetIdentifyParameters(identifyThreshold: integer; identifyRotationTolerance: integer; context: integer): integer;
Sample Code
C++ .NETret = axGrFingerXCtrl2->SetIdentifyParameters(thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT);
// error?
if (ret == GR_DEFAULT_USED) {
MessageBox::Show("Invalid identify parameters values. Default values will be used.");
}
C#
ret = axGrFingerXCtrl1.SetIdentifyParameters(thresholdId, rotationMaxId, (int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if ((GRConstants)ret == GRConstants.GR_DEFAULT_USED) {
MessageBox.Show("Invalid identify parameters values. Default values will be used.");
}
VB6
ret = GrFingerXCtrl1.SetIdentifyParameters(thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT) ' error?
If ret = GR_DEFAULT_USED Then
MsgBox ("Invalid identify parameters values. Default values will be used.") End If
VB .NET
ret = AxGrFingerXCtrl1.SetIdentifyParameters(thresholdId, rotationMaxId, GRConstants.GR_DEFAULT_CONTEXT) ' error?
If ret = GRConstants.GR_DEFAULT_USED Then
MsgBox("Invalid identify parameters values. Default values will be used.") End If
Delphi
ret := GrFingerXCtrl1.SetIdentifyParameters(thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT);
// error?
if ret = GR_DEFAULT_USED then begin
showmessage('Invalid identify parameters values. Default values will be used.');
end;
SetVerifyParameters
Sets the verification parameters in the supplied context.
Prerequisites The Fingerprint SDK library must have been previously initialized.
Return
On success, GR_OK is returned.
If any supplied parameter is invalid or out of range, its default value will be used and GR_DEFAULT_USED is returned.
On failure, the appropriate error code is returned.
Parameters
[in] verifyThreshold The verification score threshold.
[in] verifyRotationTolerance The rotation tolerance for the verification process.
[in] context Context in which the verification parameters will be set.
See also
Matching constants Context constants
Declaration
C++ .NETint SetVerifyParameters (int verifyThreshold, int verifyRotationTolerance, int context) C#
int SetVerifyParameters (int verifyThreshold, int verifyRotationTolerance, int context) VB6
Function SetVerifyParameters (ByVal verifyThreshold As Long, ByVal verifyRotationTolerance As Long, ByVal context As Long) As Long VB .NET
Function SetVerifyParameters (ByVal verifyThreshold As Integer, ByVal verifyRotationTolerance As Integer, ByVal context As Integer) As Integer Delphi
function SetVerifyParameters(verifyThreshold: integer; verifyRotationTolerance: integer; context: integer): integer;
Sample Code
C++ .NET// set the new verification parameters
ret = axGrFingerXCtrl2->SetVerifyParameters(thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT);
// error?
if (ret == GR_DEFAULT_USED) {
MessageBox::Show("Invalid verify parameters values. Default values will be used.");
}
C#
// set the new verification parameters
ret = axGrFingerXCtrl1.SetVerifyParameters(thresholdVr, rotationMaxVr, (int)GRConstants.GR_DEFAULT_CONTEXT);
// error?
if ((GRConstants)ret == GRConstants.GR_DEFAULT_USED) {
MessageBox.Show("Invalid verify parameters values. Default values will be used.");
}
VB6
' set the new verification parameters
ret = GrFingerXCtrl1.SetVerifyParameters(thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT) ' error?
If ret = GR_DEFAULT_USED Then
MsgBox ("Invalid verify parameters values. Default values will be used.") End If
VB .NET
' set the new verification parameters
ret = AxGrFingerXCtrl1.SetVerifyParameters(thresholdVr, rotationMaxVr, GRConstants.GR_DEFAULT_CONTEXT) ' error?
If ret = GRConstants.GR_DEFAULT_USED Then
MsgBox("Invalid verify parameters values. Default values will be used.") End If
Delphi
// set the new verification parameters
ret := GrFingerXCtrl1.SetVerifyParameters(thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT);
// error?
if ret = GR_DEFAULT_USED then begin
showmessage('Invalid verify parameters values. Default values will be used.');
end;
GetIdentifyParameters
Retrieves the identification parameters for the supplied context.
Prerequisites The Fingerprint SDK library must have been previously initialized.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[out] identifyThreshold The current identification score threshold.
[out] identifyRotationTolerance The current rotation tolerance for the identification process.
[in] context Context from which the identification parameters will be retrieved.
See also
Matching constants Context constants
Declaration
C++ .NETint GetIdentifyParameters (ref int identifyThreshold, ref int identifyRotationTolerance, int context) C#
int GetIdentifyParameters (ref int identifyThreshold, ref int identifyRotationTolerance, int context) VB6
Function GetIdentifyParameters (ByRef identifyThreshold As Long, ByRef identifyRotationTolerance As Long, ByVal context As Long) As Long VB .NET
Function GetIdentifyParameters (ByRef identifyThreshold As Integer, ByRef identifyRotationTolerance As Integer, ByVal context As Integer) As Integer Delphi
function GetIdentifyParameters(var identifyThreshold: integer; var identifyRotationTolerance: integer; context: integer): integer;
Sample Code
C++ .NETint thresholdId, rotationMaxId;
axGrFingerXCtrl2->GetIdentifyParameters(&thresholdId, &rotationMaxId, GR_DEFAULT_CONTEXT);
C#
int ret, thresholdId = 0, rotationMaxId = 0;
axGrFingerXCtrl1.GetIdentifyParameters(ref thresholdId, ref rotationMaxId, (int)GRConstants.GR_DEFAULT_CONTEXT);
VB6
Dim thresholdId As Long Dim rotationMaxId As Long
GrFingerXCtrl1.GetIdentifyParameters thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT
VB .NET
Dim thresholdId As Integer Dim rotationMaxId As Integer
GrFingerXCtrl1.GetIdentifyParameters thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT
Delphi Var
thresholdId : Integer;
rotationMaxId: Integer;
begin
GrFingerXCtrl1.GetIdentifyParameters(thresholdId, rotationMaxId, GR_DEFAULT_CONTEXT);
GetVerifyParameters
Retrieves the verification parameters for the supplied context.
Prerequisites The Fingerprint SDK library must have been previously initialized.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[out] verifyThreshold The current verification score threshold.
[out] verifyRotationTolerance The current rotation tolerance for the verification process.
[in] context Context from which the verification parameters will be retrieved.
See also
Matching constants Context constants
Declaration
C++ .NETint GetVerifyParameters (int verifyThreshold, int verifyRotationTolerance, int context) C#
int GetVerifyParameters (int verifyThreshold, int verifyRotationTolerance, int context) VB6
Function GetVerifyParameters (ByRef verifyThreshold As Long, ByRef verifyRotationTolerance As Long, ByVal context As Long) As Long VB .NET
Function GetVerifyParameters (ByRef verifyThreshold As Integer, ByRef verifyRotationTolerance As Integer, ByVal context As Integer) As Integer Delphi
function GetVerifyParameters(var verifyThreshold: integer; var verifyRotationTolerance: integer; context: integer): integer;
Sample Code
C++ .NETint thresholdVr, rotationMaxVr;
axGrFingerXCtrl2->GetVerifyParameters(&thresholdVr, &rotationMaxVr, GR_DEFAULT_CONTEXT);
C#
int thresholdVr = 0, rotationMaxVr = 0;
axGrFingerXCtrl1.GetVerifyParameters(ref thresholdVr, ref rotationMaxVr, (int)GRConstants.GR_DEFAULT_CONTEXT);
VB6
Dim thresholdVr As Long Dim rotationMaxVr As Long
GrFingerXCtrl1.GetVerifyParameters thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT
VB .NET
Dim thresholdVr As Integer Dim rotationMaxVr As Integer
GrFingerXCtrl1.GetVerifyParameters thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT Delphi
Var
thresholdVr : Integer;
rotationMaxVr: Integer;
begin
GrFingerXCtrl1.GetVerifyParameters(thresholdVr, rotationMaxVr, GR_DEFAULT_CONTEXT);
End