SmartFace Embedded Toolkit  4.2.1
Loading...
Searching...
No Matches
sfe_palm.h
Go to the documentation of this file.
1
8#pragma once
9
10#include "sfe_core.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16// PALM TEMPLATE EXTRACTION AND MATCHING
17
19#define SFE_PALM_TEMPLATE_SIZE 522
20
22typedef struct SFEPalmTemplate {
25
27typedef struct SFEPalmTemplateVersion {
29 uint8_t major;
31 uint8_t minor;
33 uint8_t patch;
35
36/* SFEPalmLandmarks is defined in sfe_core_detection.h (included via sfe_core.h). */
37
46 const SFEDetection *detection,
47 SFEPalmLandmarks *out_landmarks);
48
49typedef struct SFEPalmAttributes {
58 float quality;
60
70 const SFEPalmLandmarks *landmarks,
71 SFEPalmAttributes *out_attributes);
72
73
74
82 const SFEPalmLandmarks *landmarks,
83 SFEPalmTemplate *out_palm_template);
84
91 const SFEPalmTemplate *template2,
92 float *out_matching_score);
93
100 SFEPalmTemplateVersion *out_palm_template_version);
101
116sfePalmTemplateIdentify(const SFEPalmTemplate *probe_palm_template,
117 const SFEPalmTemplate *templates_gallery,
118 size_t gallery_size, float matching_score_threshold,
120 size_t *in_out_candidates_count, size_t thread_count);
121
140 const SFEPalmTemplate *templates_gallery,
141 const SFEEntity *entities_gallery,
142 size_t gallery_size,
143 float matching_score_threshold,
144 SFEEntityIdentificationCandidate *out_candidates,
145 size_t *in_out_candidates_count,
146 size_t thread_count);
147
155 const SFEDetection *detection,
156 float *out_liveness_score);
157
158#ifdef __cplusplus
159} // extern "C"
160#endif
std::optional< std::string > solver
File containing API of sfe_core library as part of SFE Toolkit.
void * SFESolver
Solver provides an abstract interface over inference models and engines.
Definition sfe_core.h:102
void * SFEError
Error type used to hold optional error message.
Definition sfe_core.h:97
SFEError sfePalmLandmarks(SFESolver solver, SFEImageView image, const SFEDetection *detection, SFEPalmLandmarks *out_landmarks)
Calculate palm landmarks from given source image and palm detection.
SFEError sfePalmTemplateMatch(const SFEPalmTemplate *template1, const SFEPalmTemplate *template2, float *out_matching_score)
Match two palm templates.
SFEError sfePalmAttributes(SFESolver solver, SFEImageView image, const SFEPalmLandmarks *landmarks, SFEPalmAttributes *out_attributes)
Calculate palm image quality attributes from given source image and palm detection.
SFEError sfePalmEntityIdentify(const SFEPalmTemplate *probe_palm_template, const SFEPalmTemplate *templates_gallery, const SFEEntity *entities_gallery, size_t gallery_size, float matching_score_threshold, SFEEntityIdentificationCandidate *out_candidates, size_t *in_out_candidates_count, size_t thread_count)
Get an ordered array of SFEEntityIdentificationCandidate from probe's template best matches with temp...
SFEError sfePalmLivenessPassive(SFESolver solver, SFEImageView image, const SFEDetection *detection, float *out_liveness_score)
Passive liveness score calculation.
SFEError sfePalmTemplateExtract(SFESolver solver, SFEImageView image, const SFEPalmLandmarks *landmarks, SFEPalmTemplate *out_palm_template)
Extract template from source image and given palm attributes.
SFEError sfePalmTemplateIdentify(const SFEPalmTemplate *probe_palm_template, const SFEPalmTemplate *templates_gallery, size_t gallery_size, float matching_score_threshold, SFETemplateIdentificationCandidate *out_candidates, size_t *in_out_candidates_count, size_t thread_count)
Get an ordered array of SFETemplateIdentificationCandidate from probe's template best matches with te...
#define SFE_PALM_TEMPLATE_SIZE
Palm template size in bytes.
Definition sfe_palm.h:19
SFEError sfePalmTemplateVersion(const SFEPalmTemplate *palm_template, SFEPalmTemplateVersion *out_palm_template_version)
Get palm template version.
Core detection - tagged union containing all detection types.
Entity type, used to group templates for entity identification. This type is compatible with uuid_v4 ...
Definition sfe_core.h:114
Candidate for identification by entity.
Definition sfe_core.h:127
Raw owned raster image representation, HWC|BGR order.
Definition sfe_core.h:70
float quality
Range <0, 1>. The recommended threshold for further palm processing is 0.6.
Definition sfe_palm.h:58
float hand_orientation
Definition sfe_palm.h:56
float hand_position
Definition sfe_palm.h:52
Palm landmarks (keypoints, hand position, orientation, confidence)
Palm template struct.
Definition sfe_palm.h:22
uint8_t data[SFE_PALM_TEMPLATE_SIZE]
Definition sfe_palm.h:23
Palm template version struct.
Definition sfe_palm.h:27
uint8_t patch
Patch template version.
Definition sfe_palm.h:33
uint8_t minor
Minor template version.
Definition sfe_palm.h:31
uint8_t major
Major template version.
Definition sfe_palm.h:29
Candidate for identification by template.
Definition sfe_core.h:119