Face SDK  1.10.0 Mozart release
Face Recognition Software Development Kit
Modules | Classes | Typedefs | Enumerations | Functions
c interface

Modules

 Fir list
 
 Fir list removed item
 
 Fir matcher factory c interface
 
 Match
 

Classes

struct  face_sdk__fir_matcher
 Fir matcher compares FIRs against each other. Matcher can perform 1:1 and 1:N matching. More...
 
struct  face_sdk__fir_matching_score_table
 

Typedefs

typedef struct face_sdk__fir_matcher face_sdk__fir_matcher_t
 Fir matcher compares FIRs against each other. Matcher can perform 1:1 and 1:N matching. More...
 
typedef struct face_sdk__fir_matching_score_table face_sdk__fir_matching_score_table_t
 

Enumerations

enum  face_sdk__architecture_type_t : uint32_t { COMMON = 0, NUMA }
 Matcher architecture type.
 

Functions

bool face_sdk__fir_matcher__get_addr (const face_sdk__fir_matcher_t *fir_matcher, uint64_t *addr)
 Retrieves face_sdk__fir_matcher_t object address. More...
 
bool face_sdk__fir_matcher__match (const face_sdk__fir_matcher_t *fir_matcher, const face_sdk__fir_t *fir_a, const face_sdk__fir_t *fir_b, float *value)
 Performs 1:1 matching operations for specified FIRs. More...
 
bool face_sdk__fir_matcher__match_1 (const face_sdk__fir_matcher_t *fir_matcher, const face_sdk__fir_list_t *fir_list, uint32_t index, const face_sdk__fir_t *fir, float *value)
 Performs 1:1 matching operations for specified FIRs. {#matcher_1_1_with_idx}. More...
 
bool face_sdk__fir_matcher__match_2 (const face_sdk__fir_matcher_t *fir_matcher, const face_sdk__fir_t *fir, const face_sdk__fir_list_t *fir_list, float **values, uint64_t *values_size)
 Performs 1:N matching operations for specified FIRs. More...
 
bool face_sdk__fir_matcher__best_matches (const face_sdk__fir_matcher_t *fir_matcher, const face_sdk__fir_t *fir, const face_sdk__fir_list_t *fir_list, float threshold, uint32_t max_matches, face_sdk__match_set_t **match_set)
 Performs 1:N matching operations for specified FIRs and retrieves top matches results. More...
 
bool face_sdk__fir_matcher__best_matches_1 (const face_sdk__fir_matcher_t *fir_matcher, const face_sdk__fir_set_t *fir_set, const face_sdk__fir_list_t *fir_list, float threshold, uint32_t max_matches, face_sdk__match_set_t **match_set)
 Performs 1:N, 2:N, 3:N and 4:N matching operations for specified FIRs and returns top matches results. Only matcher 104 supports this method. More...
 
bool face_sdk__fir_matcher__get_builder_version (const face_sdk__fir_matcher_t *fir_matcher, uint32_t *value)
 Retrieves builder algorithm version which was selected for FIRs matcher initialization. More...
 
bool face_sdk__fir_matcher__get_far_table_code (const face_sdk__fir_matcher_t *fir_matcher, uint8_t **table_code, uint64_t *table_code_size)
 Retrieves builder algorithm version which was selected for FIRs matcher initialization. More...
 
bool face_sdk__is_architecture_available (face_sdk__architecture_type_t type, bool *value)
 Checks if architecture is available. More...
 
bool face_sdk__make_fir_matcher (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, const face_sdk__license_t *license, const face_sdk__data_container_t *container, face_sdk__architecture_type_t type, face_sdk__fir_matcher_t **fir_matcher)
 Makes FIRs matcher with needed builder version, FAR table code, license object, data container and architecture type. More...
 
bool face_sdk__make_fir_matcher_1 (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, const face_sdk__license_t *license, const face_sdk__data_container_t *container, face_sdk__fir_matcher_t **fir_matcher)
 Makes FIRs matcher with needed builder version, FAR table code, license object and data container. More...
 
bool face_sdk__make_fir_matcher_2 (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, const face_sdk__license_t *license, face_sdk__fir_matcher_t **fir_matcher)
 Makes FIRs matcher with needed builder version, FAR table code and license object. Data container will be loaded from known paths (see Known paths). More...
 
bool face_sdk__make_fir_matcher_3 (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, const face_sdk__data_container_t *container, face_sdk__fir_matcher_t **fir_matcher)
 Makes FIRs matcher with needed builder version, FAR table code and data container. License will be loaded from known paths (see Known paths). More...
 
bool face_sdk__make_fir_matcher_4 (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matcher_t **fir_matcher)
 Makes FIRs matcher with needed builder version and FAR table code. License and data container will be loaded from known paths (see Known paths). More...
 
bool face_sdk__score_to_percentage (float score, float *percentage)
 Converts score to percentage. {#fir_matcher_score_to_percentage}. More...
 
bool face_sdk__percentage_to_score (float percentage, float *score)
 Converts score to percentage. {#fir_matcher_score_to_percentage}. More...
 
void face_sdk__fir_matcher_free (face_sdk__fir_matcher_t *fir_matcher)
 Destroys fir matcher object. More...
 
bool face_sdk__fir_matching_score_table__get_addr (const face_sdk__fir_matching_score_table_t *fir_matching_score_table, uint64_t *addr)
 Retrieves face_sdk__fir_matching_score_table_t object address. More...
 
bool face_sdk__fir_matching_score_table__distance_to_score (const face_sdk__fir_matching_score_table_t *handle, double distance, uint32_t firs_num, float *score)
 
bool face_sdk__make_fir_matching_score_table (uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 
bool face_sdk__make_fir_matching_score_table1 (face_sdk__data_container_t *data_container, uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 Makes face_sdk__fir_matching_score_table with specified data_container for specified builder and table code. See Matching table codes. More...
 
bool face_sdk__make_fir_matching_score_table2 (face_sdk__license_t *license, face_sdk__data_container_t *data_container, uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 Makes face_sdk__fir_matching_score_table with specified with specified license, data_container for specified builder and table code. See Matching table codes. More...
 
bool face_sdk__make_fir_matching_score_table3 (face_sdk__license_t *license, uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 Makes face_sdk__fir_matching_score_table with specified with specified license for specified builder and table code. See Matching table codes. More...
 
bool face_sdk__make_fir_matching_score_table_r (face_sdk__remote_license_t *license, face_sdk__data_container_t *data_container, uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 Makes face_sdk__fir_matching_score_table with specified with specified remote license, data_container for specified builder and table code. See Matching table codes. More...
 
bool face_sdk__make_fir_matching_score_table_r1 (face_sdk__remote_license_t *license, uint32_t builder_version, const uint8_t *table_code, uint64_t table_code_size, face_sdk__fir_matching_score_table_t **handle)
 Makes face_sdk__fir_matching_score_table with specified with specified remote license for specified builder and table code. See Matching table codes. More...
 
void face_sdk__fir_matching_score_table_free (face_sdk__fir_matching_score_table_t *handle)
 Destroys face_sdk__fir_matching_score_table. More...
 

Detailed Description

Module compares FIRs and returns the result, which the coefficient equivalent -logFAR.

Typedef Documentation

◆ face_sdk__fir_matcher_t

Fir matcher compares FIRs against each other. Matcher can perform 1:1 and 1:N matching.

Use face_sdk__make_fir_matcher() or face_sdk__fir_matcher_factory__make_fir_matcher() function to instantiate of face_sdk__fir_matcher object.

◆ face_sdk__fir_matching_score_table_t

The object translates L2 distance between FIRs to -logFAR score which is used in FaceSDK. Note, that for translation you should use different translation table for every version of Builder. See Matching table codes. Note, FaceSDK doesn't expose functions to calculate L2 distance, you can only calculate it yourself and validate against -logFAR score provided in the FaceSDK.

Function Documentation

◆ face_sdk__fir_matcher__best_matches()

bool face_sdk__fir_matcher__best_matches ( const face_sdk__fir_matcher_t fir_matcher,
const face_sdk__fir_t fir,
const face_sdk__fir_list_t fir_list,
float  threshold,
uint32_t  max_matches,
face_sdk__match_set_t **  match_set 
)

Performs 1:N matching operations for specified FIRs and retrieves top matches results.

Parameters
[in]fir_matcherFir matcher object
[in]firFir to compare
[in]fir_listFir list object
[in]thresholdComparison threshold
[in]max_matchesMaximum number of matches to store
[out]match_setSet of matches
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__best_matches_1()

bool face_sdk__fir_matcher__best_matches_1 ( const face_sdk__fir_matcher_t fir_matcher,
const face_sdk__fir_set_t fir_set,
const face_sdk__fir_list_t fir_list,
float  threshold,
uint32_t  max_matches,
face_sdk__match_set_t **  match_set 
)

Performs 1:N, 2:N, 3:N and 4:N matching operations for specified FIRs and returns top matches results. Only matcher 104 supports this method.

Parameters
[in]fir_matcherFir matcher object
[in]fir_setSet of firs to compare
[in]fir_listFir list object
[in]thresholdComparison threshold
[in]max_matchesMaximum number of matches to store
[out]match_setSet of matches
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__get_addr()

bool face_sdk__fir_matcher__get_addr ( const face_sdk__fir_matcher_t fir_matcher,
uint64_t *  addr 
)

Retrieves face_sdk__fir_matcher_t object address.

Parameters
[in]fir_matcherface_sdk__fir_matcher_t object
[out]addrObject address
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__get_builder_version()

bool face_sdk__fir_matcher__get_builder_version ( const face_sdk__fir_matcher_t fir_matcher,
uint32_t *  value 
)

Retrieves builder algorithm version which was selected for FIRs matcher initialization.

Parameters
[in]fir_matcherFir matcher object
[out]valueBuilder version
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__get_far_table_code()

bool face_sdk__fir_matcher__get_far_table_code ( const face_sdk__fir_matcher_t fir_matcher,
uint8_t **  table_code,
uint64_t *  table_code_size 
)

Retrieves builder algorithm version which was selected for FIRs matcher initialization.

Parameters
[in]fir_matcherFir matcher object
[out]table_codeString containing far table code. See text_encoding
[out]table_code_sizeSize in bytes of far_buffer string
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__match()

bool face_sdk__fir_matcher__match ( const face_sdk__fir_matcher_t fir_matcher,
const face_sdk__fir_t fir_a,
const face_sdk__fir_t fir_b,
float *  value 
)

Performs 1:1 matching operations for specified FIRs.

Parameters
[in]fir_matcherFir matcher object
[in]fir_aFir to compare
[in]fir_bFir to compare
[out]value-log(FAR). See How to interpet matching results.
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__match_1()

bool face_sdk__fir_matcher__match_1 ( const face_sdk__fir_matcher_t fir_matcher,
const face_sdk__fir_list_t fir_list,
uint32_t  index,
const face_sdk__fir_t fir,
float *  value 
)

Performs 1:1 matching operations for specified FIRs. {#matcher_1_1_with_idx}.

Parameters
[in]fir_matcherFir matcher object
[in]fir_listFir list object
[in]indexFir index in fir_list
[in]firFir to compare
[out]value-log(FAR). See How to interpet matching results.
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher__match_2()

bool face_sdk__fir_matcher__match_2 ( const face_sdk__fir_matcher_t fir_matcher,
const face_sdk__fir_t fir,
const face_sdk__fir_list_t fir_list,
float **  values,
uint64_t *  values_size 
)

Performs 1:N matching operations for specified FIRs.

Parameters
[in]fir_matcherFir matcher object
[in]firFir to compare
[in]fir_listFir list object
[out]values-log(FAR). Array of result values. Each element is the -log(FAR) value for each FIR comparison. See How to interpet matching results.
[out]values_sizeNumber of items stored in values
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matcher_free()

void face_sdk__fir_matcher_free ( face_sdk__fir_matcher_t fir_matcher)

Destroys fir matcher object.

Parameters
[in]fir_matcherFir matcher object

◆ face_sdk__fir_matching_score_table__distance_to_score()

bool face_sdk__fir_matching_score_table__distance_to_score ( const face_sdk__fir_matching_score_table_t handle,
double  distance,
uint32_t  firs_num,
float *  score 
)

Translates L2 distance between FIRs to -log(FAR) score.

Parameters
[in]hadleface_sdk__fir_matching_score_table made by face_sdk__make_fir_matching_score_table* functions
[in]distancedistance between FIRs.
[in]firs_numWarning! Use 1 by default. Do not use any other values unless you work with M:1 matching, use Builder 104 and have a clear understanding of these features.
[out]score-log(FAR) score for specified distance
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matching_score_table__get_addr()

bool face_sdk__fir_matching_score_table__get_addr ( const face_sdk__fir_matching_score_table_t fir_matching_score_table,
uint64_t *  addr 
)

Retrieves face_sdk__fir_matching_score_table_t object address.

Parameters
[in]fir_matching_score_tableface_sdk__fir_matching_score_table_t object
[out]addrObject address
Returns
true on success, false on failure. See last_error

◆ face_sdk__fir_matching_score_table_free()

void face_sdk__fir_matching_score_table_free ( face_sdk__fir_matching_score_table_t handle)

◆ face_sdk__is_architecture_available()

bool face_sdk__is_architecture_available ( face_sdk__architecture_type_t  type,
bool *  value 
)

Checks if architecture is available.

Parameters
[in]typeArchitecture type to check
[out]valueTrue if architecture is available, false if it is not available
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matcher()

bool face_sdk__make_fir_matcher ( uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
const face_sdk__license_t license,
const face_sdk__data_container_t container,
face_sdk__architecture_type_t  type,
face_sdk__fir_matcher_t **  fir_matcher 
)

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

Parameters
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of far_buffer string
[in]licenseLicense object
[in]containerThe container with algorithm data.
[in]typearchitecture type. Use face_sdk__is_architecture_available to check architecture availability.
[out]fir_matcherFir matcher object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matcher_1()

bool face_sdk__make_fir_matcher_1 ( uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
const face_sdk__license_t license,
const face_sdk__data_container_t container,
face_sdk__fir_matcher_t **  fir_matcher 
)

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

Parameters
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of far_buffer string
[in]licenseLicense object
[in]containerThe container with algorithm data.
[out]fir_matcherFir matcher object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matcher_2()

bool face_sdk__make_fir_matcher_2 ( uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
const face_sdk__license_t license,
face_sdk__fir_matcher_t **  fir_matcher 
)

Makes FIRs matcher with needed builder version, FAR table code and license object. Data container will be loaded from known paths (see Known paths).

Parameters
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of far_buffer string
[in]licenseLicense object
[out]fir_matcherFir matcher object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matcher_3()

bool face_sdk__make_fir_matcher_3 ( uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
const face_sdk__data_container_t container,
face_sdk__fir_matcher_t **  fir_matcher 
)

Makes FIRs matcher with needed builder version, FAR table code and data container. License will be loaded from known paths (see Known paths).

Parameters
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of far_buffer string
[in]containerThe container with algorithm data.
[out]fir_matcherFir matcher object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matcher_4()

bool face_sdk__make_fir_matcher_4 ( uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matcher_t **  fir_matcher 
)

Makes FIRs matcher with needed builder version and FAR table code. License and data container will be loaded from known paths (see Known paths).

Parameters
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of far_buffer string
[out]fir_matcherFir matcher object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matching_score_table1()

bool face_sdk__make_fir_matching_score_table1 ( face_sdk__data_container_t data_container,
uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matching_score_table_t **  handle 
)

Makes face_sdk__fir_matching_score_table with specified data_container for specified builder and table code. See Matching table codes.

Parameters
[in]containerThe container with algorithm data.
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of table_code string
[out]handleface_sdk__fir_matching_score_table object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matching_score_table2()

bool face_sdk__make_fir_matching_score_table2 ( face_sdk__license_t license,
face_sdk__data_container_t data_container,
uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matching_score_table_t **  handle 
)

Makes face_sdk__fir_matching_score_table with specified with specified license, data_container for specified builder and table code. See Matching table codes.

Parameters
[in]licenseLicense object
[in]containerThe container with algorithm data.
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of table_code string
[out]handleface_sdk__fir_matching_score_table object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matching_score_table3()

bool face_sdk__make_fir_matching_score_table3 ( face_sdk__license_t license,
uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matching_score_table_t **  handle 
)

Makes face_sdk__fir_matching_score_table with specified with specified license for specified builder and table code. See Matching table codes.

Parameters
[in]licenseLicense object
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of table_code string
[out]handleface_sdk__fir_matching_score_table object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matching_score_table_r()

bool face_sdk__make_fir_matching_score_table_r ( face_sdk__remote_license_t license,
face_sdk__data_container_t data_container,
uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matching_score_table_t **  handle 
)

Makes face_sdk__fir_matching_score_table with specified with specified remote license, data_container for specified builder and table code. See Matching table codes.

Parameters
[in]licenseRemote license object
[in]containerThe container with algorithm data.
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of table_code string
[out]handleface_sdk__fir_matching_score_table object
Returns
true on success, false on failure. See last_error

◆ face_sdk__make_fir_matching_score_table_r1()

bool face_sdk__make_fir_matching_score_table_r1 ( face_sdk__remote_license_t license,
uint32_t  builder_version,
const uint8_t *  table_code,
uint64_t  table_code_size,
face_sdk__fir_matching_score_table_t **  handle 
)

Makes face_sdk__fir_matching_score_table with specified with specified remote license for specified builder and table code. See Matching table codes.

Parameters
[in]licenseRemote license object
[in]builder_versionRequired version of the Builder algorithm. See Builder versions
[in]table_codeString containing far table code. See text_encoding, Matching table codes
[in]table_code_sizeSize in bytes of table_code string
[out]handleface_sdk__fir_matching_score_table object
Returns
true on success, false on failure. See last_error

◆ face_sdk__percentage_to_score()

bool face_sdk__percentage_to_score ( float  percentage,
float *  score 
)

Converts score to percentage. {#fir_matcher_score_to_percentage}.

Parameters
[in]percentagePercentage to convert
[out]scoreConverted percentage
Returns
true on success, false on failure. See last_error

◆ face_sdk__score_to_percentage()

bool face_sdk__score_to_percentage ( float  score,
float *  percentage 
)

Converts score to percentage. {#fir_matcher_score_to_percentage}.

Parameters
[in]scoreScore to convert
[out]percentageConverted score
Returns
true on success, false on failure. See last_error