Face SDK  1.13.0 Mozart release
Face Recognition Software Development Kit
fir_matcher.h
1 
4 #pragma once
5 
6 #include <face_sdk_base/export.h>
7 
8 #include <c_interface/common/face_sdk_class.h>
9 #include <c_interface/common/face_sdk_set.h>
10 #include <c_interface/face_sdk_base/data_container.h>
12 #include <c_interface/face_sdk_base/license.h>
13 #include <c_interface/face_sdk_fir_matcher/fir_list.h>
15 
16 FACE_SDK_EXTERN_C_BEGIN
17 
28 {
29  COMMON = 0,
30  NUMA
31 };
32 
37 DECLARE_FACE_SDK_CLASS(fir_matcher)
38 
39 
49 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__match(const face_sdk__fir_matcher_t *fir_matcher,
50  const face_sdk__fir_t *fir_a,
51  const face_sdk__fir_t *fir_b,
52  float *value);
53 
65 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__match_1(const face_sdk__fir_matcher_t *fir_matcher,
66  const face_sdk__fir_list_t *fir_list,
67  uint32_t index,
68  const face_sdk__fir_t *fir,
69  float *value);
70 
82 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__match_2(const face_sdk__fir_matcher_t *fir_matcher,
83  const face_sdk__fir_t *fir,
84  const face_sdk__fir_list_t *fir_list,
85  float **values,
86  uint64_t *values_size);
87 
100 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__best_matches(const face_sdk__fir_matcher_t *fir_matcher,
101  const face_sdk__fir_t *fir,
102  const face_sdk__fir_list_t *fir_list,
103  float threshold,
104  uint32_t max_matches,
105  face_sdk__match_set_t **match_set);
106 
120 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__best_matches_1(const face_sdk__fir_matcher_t *fir_matcher,
121  const face_sdk__fir_set_t *fir_set,
122  const face_sdk__fir_list_t *fir_list,
123  float threshold,
124  uint32_t max_matches,
125  face_sdk__match_set_t **match_set);
126 
135 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__get_builder_version(const face_sdk__fir_matcher_t *fir_matcher,
136  uint32_t *value);
137 
147 bool FACE_SDK_C_EXPORT face_sdk__fir_matcher__get_far_table_code(const face_sdk__fir_matcher_t *fir_matcher,
148  uint8_t **table_code,
149  uint64_t *table_code_size);
150 
159 bool FACE_SDK_C_EXPORT face_sdk__is_architecture_available(enum face_sdk__architecture_type_t type, bool *value);
160 
174 bool FACE_SDK_C_EXPORT face_sdk__make_fir_matcher(uint32_t builder_version,
175  const uint8_t *table_code,
176  uint64_t table_code_size,
177  const face_sdk__license_t *license,
178  const face_sdk__data_container_t *container,
180  face_sdk__fir_matcher_t **fir_matcher);
181 
194 bool FACE_SDK_C_EXPORT face_sdk__make_fir_matcher_1(uint32_t builder_version,
195  const uint8_t *table_code,
196  uint64_t table_code_size,
197  const face_sdk__license_t *license,
198  const face_sdk__data_container_t *container,
199  face_sdk__fir_matcher_t **fir_matcher);
200 
212 bool FACE_SDK_C_EXPORT face_sdk__make_fir_matcher_2(uint32_t builder_version,
213  const uint8_t *table_code,
214  uint64_t table_code_size,
215  const face_sdk__license_t *license,
216  face_sdk__fir_matcher_t **fir_matcher);
217 
229 bool FACE_SDK_C_EXPORT face_sdk__make_fir_matcher_3(uint32_t builder_version,
230  const uint8_t *table_code,
231  uint64_t table_code_size,
232  const face_sdk__data_container_t *container,
233  face_sdk__fir_matcher_t **fir_matcher);
234 
245 bool FACE_SDK_C_EXPORT face_sdk__make_fir_matcher_4(uint32_t builder_version,
246  const uint8_t *table_code,
247  uint64_t table_code_size,
248  face_sdk__fir_matcher_t **fir_matcher);
249 
258 bool FACE_SDK_C_EXPORT face_sdk__score_to_percentage(float score, float *percentage);
259 
269 bool FACE_SDK_C_EXPORT face_sdk__percentage_to_score(float percentage, float *score);
270 
276 void FACE_SDK_C_EXPORT face_sdk__fir_matcher_free(face_sdk__fir_matcher_t *fir_matcher);
277 
280 FACE_SDK_EXTERN_C_END
bool face_sdk__score_to_percentage(float score, float *percentage)
Converts score to percentage. {#fir_matcher_score_to_percentage}.
bool face_sdk__is_architecture_available(enum face_sdk__architecture_type_t type, bool *value)
Checks if architecture is available.
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}.
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.
FACE_SDK_EXTERN_C_BEGIN struct face_sdk__data_container face_sdk__data_container_t
The data container handle. The data container helps face_sdk to manage a data.
face_sdk__architecture_type_t
Matcher architecture type.
Definition: fir_matcher.h:27
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).
Match set.
Definition: match.h:37
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...
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...
The license object. A license object provides information about your limits in face_sdk. See Licensing.
Definition: license.h:22
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.
Fir matcher compares FIRs against each other. Matcher can perform 1:1 and 1:N matching.
Definition: fir_matcher.h:37
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).
void face_sdk__fir_matcher_free(face_sdk__fir_matcher_t *fir_matcher)
Destroys fir matcher object.
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.
Fir set.
Definition: fir_set.h:20
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.
enum face_sdk__architecture_type_t uint32_t struct face_sdk__fir_list face_sdk__fir_list_t
List of FIRs for matching.
The FIR object. FIR - Face Identification Record, biometric template.
Definition: fir.h:24
bool face_sdk__percentage_to_score(float percentage, float *score)
Converts score to percentage. {#fir_matcher_score_to_percentage}.
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.
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, enum 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 ar...
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...