Package ai.tech5.sdk.abis.finger
Class T5FingerMatcher
- java.lang.Object
-
- ai.tech5.sdk.abis.finger.T5FingerMatcher
-
public class T5FingerMatcher extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
FAST_IDENTIFY
Templates for both stages of matching (accelerator matching and precise matching) keeps in memory and identification performs in one step.static int
SLOW_IDENTIFY
Only templates for 1st stage of matching (accelerator matching) keeps in memory templates for precise matching load in memory by request based on result of 1st stage of matching and identification performs in two steps.
-
Constructor Summary
Constructors Constructor Description T5FingerMatcher()
create object of Matcher.
-
Method Summary
Modifier and Type Method Description void
cancel()
delete object of T5FingerMatchervoid
clean_gallery_2nd()
Function clean the memory database that is used by 'identify_record_2nd' function for 2nd stage of indentification It should be called before the first call of 'insert_record_2nd'boolean
create(int identify_mode, boolean check_doubles)
create object of T5FingerMatcherint
deleteRecord(java.lang.String id)
Function delete record from memory database Parameters:int
get_max_template_size()
long
getFinalGallerySize()
Function return current gallery sizejava.lang.String
getVersion()
The function returns version of Tech5_GalleryMatcher_ServerE Parameters:int
identify_record_1st(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.PersonalData probePersonalData, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function performs 1st stage of identification.int
identify_record_2nd(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function performs 2nd (final) stage of identification.int
identifyRecord(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.PersonalData probePersonalData, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function perform identification Parameters:boolean
initLicense(java.lang.String licensePath)
Function sets licenseint
insert_record_2nd(java.lang.String id, ai.tech5.sdk.abis.finger.TpTemplate tpTemplate)
Function insert record in memory database that is used by 'identify_record_2nd' function for 2nd stage of indentification Parameters:int
insertRecord(java.lang.String id, ai.tech5.sdk.abis.finger.TpTemplate tpTemplate, ai.tech5.sdk.abis.finger.PersonalData personalData)
Function insert record in memory database Parameters:boolean
isRecordExist(java.lang.String id)
Function checks record statelong
verifyRecord(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.TpTemplate gallery, java.lang.Double score, java.lang.Double logFAR)
Function verify two records(1:N), each of them can have from 1 till 10 fingerprints
-
-
-
Field Detail
-
FAST_IDENTIFY
public static int FAST_IDENTIFY
Templates for both stages of matching (accelerator matching and precise matching) keeps in memory and identification performs in one step. It's more quick way, but required more RAM
-
SLOW_IDENTIFY
public static int SLOW_IDENTIFY
Only templates for 1st stage of matching (accelerator matching) keeps in memory templates for precise matching load in memory by request based on result of 1st stage of matching and identification performs in two steps. It's slower, but required less RAM
-
-
Method Detail
-
getVersion
public java.lang.String getVersion()
The function returns version of Tech5_GalleryMatcher_ServerE Parameters:- Returns:
- value of current version
-
create
public boolean create(int identify_mode, boolean check_doubles)
create object of T5FingerMatcher- Parameters:
identify_mode
- (input) - identification mode ( @see IDENTIFY constants)check_doubles
- (input) - if true, check if record with such id already in exist will be performed while insert- Returns:
- Return false in case of error
-
cancel
public void cancel()
delete object of T5FingerMatcher
-
get_max_template_size
public int get_max_template_size()
- Returns:
- Function returns maximum size for template
-
initLicense
public boolean initLicense(java.lang.String licensePath)
Function sets license- Parameters:
licensePath
- (input) - path to the license file- Returns:
- true if success and false otherwise
-
verifyRecord
public long verifyRecord(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.TpTemplate gallery, java.lang.Double score, java.lang.Double logFAR)
Function verify two records(1:N), each of them can have from 1 till 10 fingerprints- Parameters:
matchingParameters
- ( input) - matching parametersprobe
- ( input) - first 10-finger template record. It can have from 1 till 10 fingerprint templates.gallery
- ( input) - second 10-finger template record. It can have from 1 till 10 fingerprint templates.score
- (output) - similarity of two records in a range 0...1logFAR
- (output) - log10(FAR) corresponded to getting score- Returns:
- SUCCESS if success and error code otherwise
-
insertRecord
public int insertRecord(java.lang.String id, ai.tech5.sdk.abis.finger.TpTemplate tpTemplate, ai.tech5.sdk.abis.finger.PersonalData personalData)
Function insert record in memory database Parameters:- Parameters:
id
- ( input) - unique record ID. NOTE: id - should be numerical only!tpTemplate
- ( input) - 10-finger template record. It can have from 1 till 10 fingerprint templates.personalData
- ( input) - some personal data. If it's NULL, then no binning will be used for this record while matching- Returns:
- Returns SUCCESS if success and error code otherwise
-
deleteRecord
public int deleteRecord(java.lang.String id)
Function delete record from memory database Parameters:- Parameters:
id
- ( input) - unique record ID. NOTE: id - should be numerical only!- Returns:
- Returns number of removed records
-
getFinalGallerySize
public long getFinalGallerySize()
Function return current gallery size- Returns:
- current gallery size
-
isRecordExist
public boolean isRecordExist(java.lang.String id)
Function checks record state- Parameters:
id
- ( input) - unique record ID. NOTE: id - should be numerical only!- Returns:
- true if record with this id already exist in gallery and false otherwise
-
identifyRecord
public int identifyRecord(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.PersonalData probePersonalData, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function perform identification Parameters:- Parameters:
matchingParameters
- ( input) - matching parametersprobe
- ( input) - probe 10-finger record. It can have from 1 till 10 fingerprint templates.probePersonalData
- ( input) - some personal data. If it's NULL, then no binning will be used while matchingnumberOfThreads
- ( input) - number of threads that will be used in matching. 0 - means use all logical CPU (the value returned by omp_get_num_procs())candidate_list_length
- ( input) - size of output candidate listcandidateList
- (output) - candidate list of matching if success and zero otherwise- Returns:
- Returns SUCCESS if success and error code otherwise
-
identify_record_1st
public int identify_record_1st(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, ai.tech5.sdk.abis.finger.PersonalData probePersonalData, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function performs 1st stage of identification. NOTE: function can be called only in SLOW_IDENTIFY mode Parameters:- Parameters:
matchingParameters
- ( input) - matching parametersprobe
- ( input) - probe 10-finger record. It can have from 1 till 10 fingerprint templates.probePersonalData
- ( input) - some personal data. If it's NULL, then no binning will be used while matchingnumberOfThreads
- ( input) - number of threads that will be used in matching. 0 - means use all logical CPU (the value returned by omp_get_num_procs())candidate_list_length
- ( input) - size of output candidate list (that should be get after perform both stages of identifications)candidateList
- (output) - candidate list of 1st stage of matching if success and zero otherwise- Returns:
- Returns SUCCESS if success and error code otherwise
-
clean_gallery_2nd
public void clean_gallery_2nd()
Function clean the memory database that is used by 'identify_record_2nd' function for 2nd stage of indentification It should be called before the first call of 'insert_record_2nd'
-
insert_record_2nd
public int insert_record_2nd(java.lang.String id, ai.tech5.sdk.abis.finger.TpTemplate tpTemplate)
Function insert record in memory database that is used by 'identify_record_2nd' function for 2nd stage of indentification Parameters:- Parameters:
id
- ( input) - unique record ID. NOTE: id - should be numerical only!tpTemplate
- ( input) - 10-finger template record. It can have from 1 till 10 fingerprint templates.- Returns:
- SUCCESS if success and error code otherwise
-
identify_record_2nd
public int identify_record_2nd(ai.tech5.sdk.abis.finger.MatchingParameters matchingParameters, ai.tech5.sdk.abis.finger.TpTemplate probe, int numberOfThreads, int candidate_list_length, java.util.ArrayList<ai.tech5.sdk.abis.finger.CandidatesString> candidateList)
Function performs 2nd (final) stage of identification. NOTE: function can be called only in SLOW_IDENTIFY mode Parameters:- Parameters:
matchingParameters
- ( input) - matching parametersprobe
- ( input) - probe 10-finger record. It can have from 1 till 10 fingerprint templates.numberOfThreads
- ( input) - number of threads that will be used in matching. 0 - means use all logical CPU (the value returned by omp_get_num_procs())candidate_list_length
- ( input) - size of final output candidate listcandidateList
- (output) - candidate list of matching if success and zero otherwise- Returns:
- Returns SUCCESS if success and error code otherwise
-
-