FbsTemplateMatcher.h File Reference

Describes the FbsTemplateMatcherHandle, the module used to store a gallery of FbsIdRecordHandle and which can perform biometric searching on its stored gallery. More...

#include "FbsIdRecord.h"
#include "FbsResultList.h"
#include "FoundationBridgeSDKDll.h"
#include "FbsProbeDescriptor.h"
#include "FbsTemplateMatcherConfiguration.h"

Typedefs

typedef TemplateMatcherStruct * FbsTemplateMatcherHandle

Functions

FbsTemplateMatcherHandle fbsCreateTemplateMatcher (int nThreads)
bool fbsDestroyTemplateMatcher (FbsTemplateMatcherHandle &handle)
bool fbsTemplateMatcherInit (FbsTemplateMatcherHandle handle, const char *id, const char *templateFolder, bool recover)
bool fbsTemplateMatcherIdentify (FbsTemplateMatcherHandle handle, FbsIdRecordHandle probeRecord, FbsProbeDescriptorHandle probeDescriptor, FbsResultListHandle outResult, FBSuint32 threadIndexA)
bool fbsTemplateMatcherGetConfiguration (FbsTemplateMatcherHandle handleA, FbsTemplateMatcherConfigurationHandle &configHandle)
bool fbsTemplateMatcherAdd (FbsTemplateMatcherHandle handle, FbsIdRecordHandle galleryRecord, const FBSuint32 *queryLanguageAttributes)
bool fbsTemplateMatcherGetNumberOfIdRecords (FbsTemplateMatcherHandle handle, int &size)
bool fbsTemplateMatcherGetNumberOfPersons (FbsTemplateMatcherHandle handle, int &size)
bool fbsTemplateMatcherGetIdRecord (FbsTemplateMatcherHandle handle, FbsIdRecordHandle &galleryRecord, FBSuint64 transactionID)
bool fbsTemplateMatcherDeleteIdRecord (FbsTemplateMatcherHandle handle, FBSuint64 transactionID)
bool fbsTemplateMatcherDeleteAllIdRecords (FbsTemplateMatcherHandle handle)
bool fbsTemplateMatcherGetQueryLanguageAttributes (FbsTemplateMatcherHandle handle, FBSuint64 transactionID, const FBSuint32 *&data, int &datasize)
bool fbsTemplateMatcherGetTransactionID (FbsTemplateMatcherHandle handle, const FBSuint32 *data, int datasize, FBSuint64 &transactionID)
bool fbsTemplateMatcherGetMaxTransactionID (FbsTemplateMatcherHandle handle, FBSuint64 &transactionID)
bool fbsTemplateMatcherSetRandomizeFeatures (FbsTemplateMatcherHandle handle)
bool fbsTemplateMatcherSetPerflogFilename (FbsTemplateMatcherHandle handle, const char *filenameA)
bool fbsTemplateMatcherSetFreqImageFilename (FbsTemplateMatcherHandle tmmpStructPtrA, const char *filenameA)
bool fbsTemplateMatcherDumpToFile (FbsTemplateMatcherHandle tmmpStructPtrA, const char *filenameA)
bool fbsTemplateMatcherDumpBinaryToFile (FbsTemplateMatcherHandle tmmpStructPtrA, const char *filenameA)
bool fbsTemplateMatcherDumpShortBinaryToFile (FbsTemplateMatcherHandle tmmpStructPtrA, const char *filenameA)


Detailed Description

Describes the FbsTemplateMatcherHandle, the module used to store a gallery of FbsIdRecordHandle and which can perform biometric searching on its stored gallery.

The FbsTemplateMatcherHandle has few search settings as most search parameters are set within the FbsProbeDescriptorHandle and the FbsProbeSampleDescriptorHandle. The few exceptions include the number of threads this template matcher is using and the template matcher id that maps to the correct section within the xml configuration files that is to be used.

The FbsTemplateMatcherConfigurationHandle that manages parameters such as pass size and is housed within the FbsProbeDescriptorHandle should be initially created from the FbsTemplateMatcherHandle that the search will be conducted with.

Beside handling searching the FbsTemplateMatcherHandle also has in its interface some gallery management functions like add, delete, and retrieval.

The FbsTemplateMatcherHandle can be used to retrieve from previously stored data from disk. However, the number of threads used to initialize the matcher must remain the same in order for reloading from disk to be successful.

Copyright 2008:
L1 Identiy Solutions
Project:
Foundation Bridge
Language and Compiler:
C, tested with Microsoft Visual C++ 8.0 SP1

Typedef Documentation

typedef TemplateMatcherStruct* FbsTemplateMatcherHandle

Handle to template matcher module.


Function Documentation

FbsTemplateMatcherHandle fbsCreateTemplateMatcher ( int  nThreads  ) 

Create an uninitialized FbsTemplateMatcherHandle

Parameters:
nThreads the number of threads that this FbsTemplateMatcherHandle will use to do searching. Note that the FbsTemplateMatcherHandle can be used to retrieve from previously stored data from disk. However, the number of threads used to initialize the matcher must remain the same in order for reloading from disk to be successful.
Returns:
FbsTemplateMatcherHandle

bool fbsDestroyTemplateMatcher ( FbsTemplateMatcherHandle &  handle  ) 

Destroy an FbsTemplateMatcherHandle

Parameters:
handle FbsTemplateMatcherHandle to be destroyed. Reference will be set to 0.

bool fbsTemplateMatcherAdd ( FbsTemplateMatcherHandle  handle,
FbsIdRecordHandle  galleryRecord,
const FBSuint32 *  queryLanguageAttributes 
)

Add an FbsIdRecordHandle with an associated list of query attributes to this FbsTemplateMatcherHandle

Parameters:
handle destination FbsTemplateCreatorHandle to which FbsTemplateMatcherHandle will be added
galleryRecord a copy of this FbsIdRecordHandle is to be added to this gallery. Client must call fbsDestroyIdRecord on FbsIdRecordHandle as only copy is inserted into the gallery.
queryLanguageAttributes array of query attributes be associated with this gallery member. If non-0 this array must be the same size as the maximum query attribute size allowable in the configuration file.

bool fbsTemplateMatcherDeleteAllIdRecords ( FbsTemplateMatcherHandle  handle  ) 

Delete all records from both disk and memory from the given FbsTemplateMatcherHandle. This function should be used with caution as all data will be deleted and unrecoverable.

Parameters:
handle the FbsTemplateCreatorHandle which is being cleared of all records.

bool fbsTemplateMatcherDeleteIdRecord ( FbsTemplateMatcherHandle  handle,
FBSuint64  transactionID 
)

Delete the FbsIdRecordHandle from this FbsTemplateMatcherHandle with the given transactionID. Both the memory and harddisk data will be removed permanently.

Parameters:
handle the FbsTemplateCreatorHandle that is to be modified
transactionID the transactionId of the FbsIdRecordHandle to be deleted

bool fbsTemplateMatcherDumpBinaryToFile ( FbsTemplateMatcherHandle  tmmpStructPtrA,
const char *  filenameA 
)

bool fbsTemplateMatcherDumpShortBinaryToFile ( FbsTemplateMatcherHandle  tmmpStructPtrA,
const char *  filenameA 
)

bool fbsTemplateMatcherDumpToFile ( FbsTemplateMatcherHandle  tmmpStructPtrA,
const char *  filenameA 
)

bool fbsTemplateMatcherGetConfiguration ( FbsTemplateMatcherHandle  handleA,
FbsTemplateMatcherConfigurationHandle &  configHandle 
)

Retrieve a copy of the configuration used by this FbsTemplateMatcherHandle

Parameters:
handle source FbsTemplateCreatorHandle from which to generate the FbsTemplateMatcherConfigurationHandle
configHandle output parameter contanining FbsTemplateMatcherConfigurationHandle for this FbsTemplateMatcherHandle. Incoming configHandle reference is assumed to be set to 0.

bool fbsTemplateMatcherGetIdRecord ( FbsTemplateMatcherHandle  handle,
FbsIdRecordHandle &  galleryRecord,
FBSuint64  transactionID 
)

Retrieve the FbsIdRecordHandle managed by this FbsTemplateMatcherHandle associated with the given transactionID

Parameters:
handle source FbsTemplateCreatorHandle
galleryRecord output parameter contaning copy of the FbsIdRecordHandle managed by the FbsTemplateMatcherHandle. Client is responsible for calling fbsDestroyIdRecord on this handle when done.
transactionID the transactionId of the FbsIdRecordHandle to be retrieved

bool fbsTemplateMatcherGetMaxTransactionID ( FbsTemplateMatcherHandle  handle,
FBSuint64 &  transactionID 
)

Use retrieve the maximum transactionID

Parameters:
handle source FbsTemplateMatcherHandle
output the maximum transactionId

bool fbsTemplateMatcherGetNumberOfIdRecords ( FbsTemplateMatcherHandle  handle,
int &  size 
)

Retrieve the number of FbsIdRecordHandle records managed by this FbsTemplateMatcherHandle

Parameters:
handle source FbsTemplateCreatorHandle
size output parameter specifying the size of the galley managed by this FbsTemplateMatcherHandle

bool fbsTemplateMatcherGetNumberOfPersons ( FbsTemplateMatcherHandle  handle,
int &  size 
)

Retrieve the number of FbsIdRecordHandle records with a unique personId managed by this FbsTemplateMatcherHandle

Parameters:
handle source FbsTemplateCreatorHandle
size output parameter specifying the number of unique personIds managed by this FbsTemplateMatcherHandle

bool fbsTemplateMatcherGetQueryLanguageAttributes ( FbsTemplateMatcherHandle  handle,
FBSuint64  transactionID,
const FBSuint32 *&  data,
int &  datasize 
)

Use transactionID to retrieve the queryLanguage data

Parameters:
handle source FbsTemplateMatcherHandle
transactionID the transactionId of the requested QueryLanguage data
data output parameter
datasize size of the data

bool fbsTemplateMatcherGetTransactionID ( FbsTemplateMatcherHandle  handle,
const FBSuint32 *  data,
int  datasize,
FBSuint64 &  transactionID 
)

Use queryLanguage data to retrieve the transactionID

Parameters:
handle source FbsTemplateMatcherHandle
data output parameter
datasize size of the data
output transactionID the transactionId of the requested QueryLanguage data

bool fbsTemplateMatcherIdentify ( FbsTemplateMatcherHandle  handle,
FbsIdRecordHandle  probeRecord,
FbsProbeDescriptorHandle  probeDescriptor,
FbsResultListHandle  outResult,
FBSuint32  threadIndexA 
)

Perform search against gallery managed by FbsTemplateMatcherHandle

Parameters:
handle FbsTemplateCreatorHandle to be searched.
probeRecord the probe FbsIdRecordHandle. When creating the probe FbsIdRecordHandle, client must rememeber to ask for probe templates. fbsTemplateMatcherIdentify will not search algorithms that have no associated probe template blocks.
fbsProbeDescriptor the FbsProbeDescriptorHandle which contains settings, parameters, query language to be associated with this search
outResult destination FbsResultListHandle which will contain all the results produced by the search. Client must first create an empty FbsResultListHandle using fbsCreateResultList. Destroy the FbsResultListHandle when done by calling fbsDestroyResultList.

bool fbsTemplateMatcherInit ( FbsTemplateMatcherHandle  handle,
const char *  id,
const char *  templateFolder,
bool  recover 
)

Initialize an FbsTemplateCreatorHandle. This must be the first function called after fbsCreateTemplateMatcher.

Parameters:
handle FbsTemplateCreatorHandle to be initialized.
id The configuration section that this FbsTemplateMatcherHandle will draw it configuration settings from.
templateFolder the location of the gallery watchlist FID file. Overrides template folder setting in configuration files. Pass in 0 to use default.
recover if true attempts to load in previously stored gallery members. If false persistent gallery is cleared and client starts from scratch.

bool fbsTemplateMatcherSetFreqImageFilename ( FbsTemplateMatcherHandle  tmmpStructPtrA,
const char *  filenameA 
)

bool fbsTemplateMatcherSetPerflogFilename ( FbsTemplateMatcherHandle  handle,
const char *  filenameA 
)

bool fbsTemplateMatcherSetRandomizeFeatures ( FbsTemplateMatcherHandle  handle  ) 


Generated on Wed Jun 17 16:45:08 2009 for ABIS Foundation SDK by  doxygen 1.5.8