Face SDK  1.13.0 Mozart release
Face Recognition Software Development Kit
Classes | Functions | Variables
Java interface

Classes

class  com.tech5.FaceSDK.FirList.Native
 
class  com.tech5.FaceSDK.FirList
 
enum  com.tech5.FaceSDK.FirMatcher.Architecture
 
class  com.tech5.FaceSDK.FirMatcher.Match
 
class  com.tech5.FaceSDK.FirMatcher.Native
 
class  com.tech5.FaceSDK.FirMatcher
 

Functions

 com.tech5.FaceSDK.FirList.FirList () throws FaceSDKException
 
 com.tech5.FaceSDK.FirList.FirList (FirMatcher.Architecture architecture) throws FaceSDKException
 
long [] com.tech5.FaceSDK.FirList.remove (long idx) throws FaceSDKException
 
long com.tech5.FaceSDK.FirList.add (Fir fir) throws FaceSDKException
 
void com.tech5.FaceSDK.FirList.reserve (Fir forFir, long count) throws FaceSDKException
 
long com.tech5.FaceSDK.FirList.size ()
 
boolean com.tech5.FaceSDK.FirList.equals (Object o)
 
int com.tech5.FaceSDK.FirList.hashCode ()
 
void com.tech5.FaceSDK.FirList.close () throws Exception
 
void com.tech5.FaceSDK.FirList.finalize () throws Throwable
 
 com.tech5.FaceSDK.FirMatcher.FirMatcher (int builderVersion, String tableCode, License license, DataContainer dataContainer, Architecture architecture) throws FaceSDKException
 
 com.tech5.FaceSDK.FirMatcher.FirMatcher (int builderVersion, String tableCode, License license, DataContainer dataContainer) throws FaceSDKException
 
 com.tech5.FaceSDK.FirMatcher.FirMatcher (int builderVersion, String tableCode, License license) throws FaceSDKException
 
 com.tech5.FaceSDK.FirMatcher.FirMatcher (int builderVersion, String tableCode, DataContainer dataContainer) throws FaceSDKException
 
 com.tech5.FaceSDK.FirMatcher.FirMatcher (int builderVersion, String tableCode) throws FaceSDKException
 
float com.tech5.FaceSDK.FirMatcher.match (Fir firA, Fir firB) throws FaceSDKException
 
float com.tech5.FaceSDK.FirMatcher.match (FirList firList, long index, Fir fir) throws FaceSDKException
 
float [] com.tech5.FaceSDK.FirMatcher.match (FirList firList, Fir fir) throws FaceSDKException
 
Match [] com.tech5.FaceSDK.FirMatcher.bestMatches (Fir fir, FirList firList, float threshold, int maxMatches) throws FaceSDKException
 
Match [] com.tech5.FaceSDK.FirMatcher.bestMatches (FirSet firSet, FirList firList, float threshold, int maxMatches) throws FaceSDKException
 
int com.tech5.FaceSDK.FirMatcher.getBuilderVersion ()
 
String com.tech5.FaceSDK.FirMatcher.getTableCode ()
 
boolean com.tech5.FaceSDK.FirMatcher.equals (Object o)
 
int com.tech5.FaceSDK.FirMatcher.hashCode ()
 
void com.tech5.FaceSDK.FirMatcher.close () throws Exception
 
void com.tech5.FaceSDK.FirMatcher.finalize () throws Throwable
 
static boolean com.tech5.FaceSDK.FirMatcher.isArchitectureAvailable (Architecture architecture)
 
static float com.tech5.FaceSDK.FirMatcher.scoreToPercentage (float score) throws FaceSDKException
 
static float com.tech5.FaceSDK.FirMatcher.percentageToScore (float percentage) throws FaceSDKException
 

Variables

 com.tech5.FaceSDK.FirMatcher.Architecture.COMMON
 
 com.tech5.FaceSDK.FirMatcher.Architecture.NUMA
 
final float com.tech5.FaceSDK.FirMatcher.Match.score
 
final long com.tech5.FaceSDK.FirMatcher.Match.index
 

Detailed Description

Function Documentation

◆ add()

long com.tech5.FaceSDK.FirList.add ( Fir  fir) throws FaceSDKException
inline

Adds a copy of the FIR to list.

A copy of the for will be converted to short (or binary if fir's version is 211) before storing.

Parameters
firthe fir, a copy of which will be stored in the list.
Returns
an index of the added fir.
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ bestMatches() [1/2]

Match [] com.tech5.FaceSDK.FirMatcher.bestMatches ( Fir  fir,
FirList  firList,
float  threshold,
int  maxMatches 
) throws FaceSDKException
inline

Performs 1:N matching operation for fir list and specified FIR and returns top N matching results.

Parameters
firfir to be matched against fir list.
firListfir list to be matched against fir.
thresholdmatching scores threshold.
maxMatchesthe maximum number of best matches returned from the function.
Returns
array of matches where length of the array is not greater than maxMathes
Exceptions
IllegalArgumentExceptionif fir is null OR firList is null OR maxMatches is lower than 1.
FaceSDKExceptionin case of an error in native code.

◆ bestMatches() [2/2]

Match [] com.tech5.FaceSDK.FirMatcher.bestMatches ( FirSet  firSet,
FirList  firList,
float  threshold,
int  maxMatches 
) throws FaceSDKException
inline

Performs 1:N 2:N, 3:N matching operation for fir list and specified firSet and returns top N matching results.

2:N and 3:N operations are available only for builder 104.

Parameters
firSetset of firs to be matched against fir list.
firListfir list to be matched against set of firs.
thresholdmatching scores threshold.
maxMatchesthe maximum number of best matches returned from the function.
Returns
array of matches where length of the array is not greater than maxMathes
Exceptions
IllegalArgumentExceptionif firSet is null OR firList is null OR maxMatches is lower than 1.
FaceSDKExceptionin case of an error in native code.

◆ FirList() [1/2]

com.tech5.FaceSDK.FirList.FirList ( ) throws FaceSDKException
inline

Creates an empty list of FIRs.

FirMatcher.Architecture#NUMA architecture will be used if available and FirMatcher.Architecture#COMMON otherwise.

Exceptions
FaceSDKExceptionin case of an error in native code.

◆ FirList() [2/2]

com.tech5.FaceSDK.FirList.FirList ( FirMatcher.Architecture  architecture) throws FaceSDKException
inline

Creates an empty list of FIRs for specified memory architecture.
Use FirMatcher#isArchitectureAvailable(com.tech5.FaceSDK.FirMatcher.Architecture) to know which type of memory architecture is available.

Parameters
architecturerequired memory architecture
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ FirMatcher() [1/5]

com.tech5.FaceSDK.FirMatcher.FirMatcher ( int  builderVersion,
String  tableCode,
License  license,
DataContainer  dataContainer,
Architecture  architecture 
) throws FaceSDKException
inline

Creates FIRs matcher with needed builder version, FAR table code, license object, data container and memory architecture type.

Parameters
builderVersionbuilder's version which FIRs are supposed to be compared.
tableCodematcher's table code.
licensethe license object.
dataContainerthe container with algorithm data.
architecturethe memory architecture type.
Exceptions
IllegalArgumentExceptionif tableCode is null or empty OR license is null OR dataContainer is null.
FaceSDKExceptionin case of an error in native code.

◆ FirMatcher() [2/5]

com.tech5.FaceSDK.FirMatcher.FirMatcher ( int  builderVersion,
String  tableCode,
License  license,
DataContainer  dataContainer 
) throws FaceSDKException
inline

Creates FIRs matcher with needed builder version, FAR table code, license object and data container.

FirMatcher.Architecture#NUMA is used if available and FirMatcher.Architecture#COMMON otherwise.

Parameters
builderVersionbuilder version which FIRs are supposed to be compared.
tableCodematcher table code.
licensethe license object.
dataContainerthe container with algorithm data.
Exceptions
IllegalArgumentExceptionif tableCode is null or empty OR license is null OR dataContainer is null.
FaceSDKExceptionin case of an error in native code.

◆ FirMatcher() [3/5]

com.tech5.FaceSDK.FirMatcher.FirMatcher ( int  builderVersion,
String  tableCode,
License  license 
) throws FaceSDKException
inline

Creates FIRs matcher with needed builder version, FAR table code, license object.

The data container is loaded from known paths.
FirMatcher.Architecture#NUMA is used if available and FirMatcher.Architecture#COMMON otherwise.

Parameters
builderVersionbuilder version which FIRs are supposed to be compared.
tableCodematcher table code.
licensethe license object.
Exceptions
IllegalArgumentExceptionif tableCode is null or empty.
FaceSDKExceptionin case of an error in native code.

◆ FirMatcher() [4/5]

com.tech5.FaceSDK.FirMatcher.FirMatcher ( int  builderVersion,
String  tableCode,
DataContainer  dataContainer 
) throws FaceSDKException
inline

Creates FIRs matcher with needed builder version, FAR table code, license object and data container.

FirMatcher.Architecture#NUMA is used if available and FirMatcher.Architecture#COMMON otherwise.
The default license is loaded. License#makeDefaultLicense().

Parameters
builderVersionbuilder version which FIRs are supposed to be compared.
tableCodematcher table code.
dataContainerthe container with algorithm data.
Exceptions
IllegalArgumentExceptionif tableCode is null or empty OR dataContainer is null.
FaceSDKExceptionin case of an error in native code.

◆ FirMatcher() [5/5]

com.tech5.FaceSDK.FirMatcher.FirMatcher ( int  builderVersion,
String  tableCode 
) throws FaceSDKException
inline

Creates FIRs matcher with needed builder version and FAR table code.

FirMatcher.Architecture#NUMA is used if available and FirMatcher.Architecture#COMMON otherwise.
The data container is loaded from known paths.
The default license is loaded. License#makeDefaultLicense().

Parameters
builderVersionbuilder version which FIRs are supposed to be compared.
tableCodematcher table code.
Exceptions
IllegalArgumentExceptionif tableCode is null or empty.
FaceSDKExceptionin case of an error in native code.

◆ isArchitectureAvailable()

static boolean com.tech5.FaceSDK.FirMatcher.isArchitectureAvailable ( Architecture  architecture)
inlinestatic

Checks if the specified memory architecture is available

Parameters
architecturememory architecture type.
Returns
true if the memory architecture is available and false otherwise.

◆ match() [1/3]

float com.tech5.FaceSDK.FirMatcher.match ( Fir  firA,
Fir  firB 
) throws FaceSDKException
inline

Performs 1:1 matching operation for specified FIRs.

Parameters
firAfir to be matched against firB
firBfir to be matched against firA
Returns
matching score (-log(FAR))
Exceptions
IllegalArgumentExceptionif firA is null or firB is null.
FaceSDKExceptionin case of an error in native code.

◆ match() [2/3]

float com.tech5.FaceSDK.FirMatcher.match ( FirList  firList,
long  index,
Fir  fir 
) throws FaceSDKException
inline

Performs 1:1 matching operation for FIR from fir list and specified FIR.

Parameters
firListfir list from which firA must be matched against firB
indexindex of the firA in the firList
firfirB to be matched against firA
Returns
matching score (-log(FAR))
Exceptions
IllegalArgumentExceptionif firList is null OR index is negative OR fir is null.
FaceSDKExceptionin case of an error in native code.

◆ match() [3/3]

float [] com.tech5.FaceSDK.FirMatcher.match ( FirList  firList,
Fir  fir 
) throws FaceSDKException
inline

Performs 1:N matching operation for fir list and specified FIR.

Parameters
firListfir list to be matched against fir
firfirB to be matched against firA
Returns
array of matching scores (-log(FAR)) where i-element in the array represents the matching score i-FIR from firList against fir.
Exceptions
IllegalArgumentExceptionif firList is null OR fir is null.
FaceSDKExceptionin case of an error in native code.

◆ percentageToScore()

static float com.tech5.FaceSDK.FirMatcher.percentageToScore ( float  percentage) throws FaceSDKException
inlinestatic

Converts percentage to matching score (-log(FAR)).

Parameters
percentagepercentage.
Returns
matching score (-log(FAR)) which is corresponding to the percentage.
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ remove()

long [] com.tech5.FaceSDK.FirList.remove ( long  idx) throws FaceSDKException
inline

Remove FIR by index.

Removing algorithm: when the FIR is removed his index is assigning to another FIR.
For example: if we have 10 FIRs in the list and we are removing FIR with the index 3 we take FIR with index 9 and move it to the position of the removed FIR.
So FIR 9 becomes FIR 3.

Parameters
idxIndex of FIR to be removed
Returns
Return an array with 2 elements. First element is the index of removed FIR. Second element is the index of moved FIR.
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ reserve()

void com.tech5.FaceSDK.FirList.reserve ( Fir  forFir,
long  count 
) throws FaceSDKException
inline

Preallocates memory for FIRs data.

Parameters
forFirfir type of which are supposed to be stored in the list.
countnumber of FIRs which is supposed to be stored in the list.
Exceptions
IllegalArgumentExceptionif forFir is null or count <= 0.
FaceSDKExceptionin case of an error in native code.

◆ scoreToPercentage()

static float com.tech5.FaceSDK.FirMatcher.scoreToPercentage ( float  score) throws FaceSDKException
inlinestatic

Converts matching score (-log(FAR)) to percentage.

Parameters
scorematching score (-log(FAR)).
Returns
percentage which is corresponding to the matching score.
Exceptions
FaceSDKExceptionin case of an error in native code.

◆ size()

long com.tech5.FaceSDK.FirList.size ( )
inline

List size.

Returns
list size.

Variable Documentation

◆ COMMON

com.tech5.FaceSDK.FirMatcher.Architecture.COMMON

Uniform memory access (for systems with single CPU)

◆ index

final long com.tech5.FaceSDK.FirMatcher.Match.index

Index of the Fir in the FirList

◆ NUMA

com.tech5.FaceSDK.FirMatcher.Architecture.NUMA

Non Uniform memory access (for systems with multiply CPUs)

NUMA allow to spread FIRs between nodes, which gives a performance boost

◆ score

final float com.tech5.FaceSDK.FirMatcher.Match.score

Matching score, which the coefficient equivalent -logFAR.