SmartFace Embedded Toolkit  4.2.1
Loading...
Searching...
No Matches
sfe_core_detection.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <stdbool.h>
11#include <stddef.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
18typedef struct SFEBoundingBox {
21 float x;
24 float y;
27 float width;
30 float height;
32
34typedef struct SFEOrientedBoundingBox {
37 float center_x;
40 float center_y;
43 float width;
46 float height;
49 float angle;
51
52// FACE DETECTION TYPES
53
54typedef struct SFEFaceDetectionData {
58
59// IRIS DETECTION TYPES
60
62typedef enum SFEIrisKeypointType {
72
74typedef struct SFEIrisKeypoint {
80 float x;
82 float y;
84
86#define SFE_IRIS_KEYPOINT_COUNT 8
87
89typedef struct SFEIrisDetectionData {
95
96// PALM DETECTION TYPES
97
99typedef struct SFEPalmKeypoint {
101 float x;
103 float y;
107
109#define SFE_PALM_KEYPOINT_COUNT 8
110
112typedef enum SFEHandPosition {
117
119typedef enum SFEHandOrientation {
124
126typedef struct SFEPalmLandmarks {
136
138typedef struct SFEPalmDetectionData {
144
145// OBJECT DETECTION TYPES
146
148typedef enum SFEObjectType {
230
232typedef struct SFEObject {
238
240#define SFE_OBJECT_DETECT 80
241
247
248// TATTOO DETECTION TYPES
249
255
256// PERSON DETECTION TYPES
257
263
264// VISUAL CODE DETECTION TYPES
265
271
273typedef struct SFEVisualCodeKeypoint {
275 float x;
277 float y;
279
281#define SFE_VISUAL_CODE_KEYPOINT_COUNT 4
282
288
289// CORE DETECTION TYPES
290
292typedef enum SFEModality {
301
303typedef union SFEModalityData {
319
323typedef struct SFEDetection {
335
336#ifdef __cplusplus
337} // extern "C"
338#endif
#define SFE_IRIS_KEYPOINT_COUNT
Iris keypoints count.
SFEModality
Detection modality enumeration.
@ SFE_MODALITY_PERSON
@ SFE_MODALITY_TATTOO
@ SFE_MODALITY_PALM
@ SFE_MODALITY_IRIS
@ SFE_MODALITY_VISUAL_CODE
@ SFE_MODALITY_FACE
@ SFE_MODALITY_OBJECT
SFEHandPosition
Palm hand enum.
@ SFE_HAND_LEFT
@ SFE_HAND_RIGHT
@ SFE_HAND_UNKNOWN
SFEHandOrientation
Palm orientation enum.
@ SFE_ORIENTATION_DORSAL
@ SFE_ORIENTATION_PALMAR
@ SFE_ORIENTATION_UNKNOWN
SFEIrisKeypointType
Iris keypoint types.
@ SFE_IRIS_KEYPOINT_TYPE_BOTTOM_INNER_RIGHT
@ SFE_IRIS_KEYPOINT_TYPE_BOTTOM_RIGHT
@ SFE_IRIS_KEYPOINT_TYPE_TOP_LEFT
@ SFE_IRIS_KEYPOINT_TYPE_TOP_INNER_LEFT
@ SFE_IRIS_KEYPOINT_TYPE_BOTTOM_INNER_LEFT
@ SFE_IRIS_KEYPOINT_TYPE_TOP_INNER_RIGHT
@ SFE_IRIS_KEYPOINT_TYPE_TOP_RIGHT
@ SFE_IRIS_KEYPOINT_TYPE_BOTTOM_LEFT
#define SFE_PALM_KEYPOINT_COUNT
Palm keypoints count.
SFEVisualCodeCategory
Visual code category enumeration.
@ SFE_VISUAL_CODE_CATEGORY_PALM
@ SFE_VISUAL_CODE_CATEGORY_QR_CODE
#define SFE_OBJECT_DETECT
Object detection count.
SFEObjectType
Object type enumeration.
@ SFE_OBJECT_TYPE_TRAIN
@ SFE_OBJECT_TYPE_SCISSORS
@ SFE_OBJECT_TYPE_REFRIGERATOR
@ SFE_OBJECT_TYPE_MICROWAVE
@ SFE_OBJECT_TYPE_DININGTABLE
@ SFE_OBJECT_TYPE_COUCH
@ SFE_OBJECT_TYPE_COW
@ SFE_OBJECT_TYPE_BEAR
@ SFE_OBJECT_TYPE_SNOWBOARD
@ SFE_OBJECT_TYPE_UMBRELLA
@ SFE_OBJECT_TYPE_BOTTLE
@ SFE_OBJECT_TYPE_SPORTSBALL
@ SFE_OBJECT_TYPE_BUS
@ SFE_OBJECT_TYPE_POTTEDPLANT
@ SFE_OBJECT_TYPE_STOPSIGN
@ SFE_OBJECT_TYPE_KEYBOARD
@ SFE_OBJECT_TYPE_BANAN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E_BED
@ SFE_OBJECT_TYPE_SHEEP
@ SFE_OBJECT_TYPE_DONUT
@ SFE_OBJECT_TYPE_ZEBRA
@ SFE_OBJECT_TYPE_SANDWICH
@ SFE_OBJECT_TYPE_TIE
@ SFE_OBJECT_TYPE_MOTORCYCLE
@ SFE_OBJECT_TYPE_ORANGE
@ SFE_OBJECT_TYPE_BASEBALLBAT
@ SFE_OBJECT_TYPE_TOILET
@ SFE_OBJECT_TYPE_KNIFE
@ SFE_OBJECT_TYPE_MOUSE
@ SFE_OBJECT_TYPE_CHAIR
@ SFE_OBJECT_TYPE_FRISBEE
@ SFE_OBJECT_TYPE_CELLPHONE
@ SFE_OBJECT_TYPE_BENCH
@ SFE_OBJECT_TYPE_ELEPHANT
@ SFE_OBJECT_TYPE_WINEGLASS
@ SFE_OBJECT_TYPE_SKATEBOARD
@ SFE_OBJECT_TYPE_HORSE
float y
Y coordinate of the top left corner of the bounding box relative to source image size - range <0,...
float width
Width of the bounding box relative to source image size - range <0,1>
float x
X coordinate of the top left corner of the bounding box relative to source image size - range <0,...
float height
Height of the bounding box relative to source image size - range <0,1>
Core detection - tagged union containing all detection types.
SFEModality modality
Detection modality discriminator.
SFEOrientedBoundingBox oriented_bounding_box
Oriented bounding box (common for all detection types)
SFEModalityData modality_data
Union of all detection variant data structs (type-specific fields only)
SFEBoundingBox bounding_box
Bounding box (common for all detection types)
float confidence
Detection confidence - range <0,1> (common for all detection types)
char _reserved
Reserved field to ensure C/C++ compatibility.
Iris detection data struct (type-specific fields only)
SFEIrisKeypoint keypoints[SFE_IRIS_KEYPOINT_COUNT]
Keypoints detected on the eye.
SFEBoundingBox pupil_bounding_box
Pupil bounding box.
Iris keypoint struct.
float x
X coordinate of the keypoint relative to source image - range <0,1>
float y
Y coordinate of the keypoint relative to source image - range <0,1>
float confidence
Confidence of the keypoint - range <0,1>
SFEIrisKeypointType keypoint_type
Type of the keypoint.
Object detection data struct (type-specific fields only)
SFEObject objects[SFE_OBJECT_DETECT]
array of 80 Object structs
Object struct.
float confidence
probability scores
SFEObjectType object_type
object types
Oriented bounding box.
float center_x
X coordinate of the center of the bounding box relative to source image size - range <0,...
float angle
Angle of the bounding box in radians.
float height
Height of the bounding box relative to source image size - range <0,1>
float center_y
Y coordinate of the center of the bounding box relative to source image size - range <0,...
float width
Width of the bounding box relative to source image size - range <0,1>
Palm detection data struct (type-specific fields only)
bool has_landmarks
When true, landmarks is valid; when false, do not read landmarks.
SFEPalmLandmarks landmarks
Palm landmarks; only meaningful when has_landmarks is true.
Palm keypoint struct.
float confidence
Confidence of the keypoint - range <0,1>
float x
X coordinate of the keypoint relative to source image - range <0,1>
float y
Y coordinate of the keypoint relative to source image - range <0,1>
Palm landmarks (keypoints, hand position, orientation, confidence)
SFEPalmKeypoint keypoints[SFE_PALM_KEYPOINT_COUNT]
Palm keypoints.
float confidence
Confidence score - range <0,1>
SFEHandPosition hand_position
Detected hand position.
SFEHandOrientation hand_orientation
Detected palm orientation.
Person detection data struct (type-specific fields only)
char _reserved
Reserved field to ensure C/C++ compatibility.
Tattoo detection data struct (type-specific fields only)
char _reserved
Reserved field to ensure C/C++ compatibility.
Visual code detection data struct (type-specific fields only)
SFEVisualCodeCategory category
Visual code category.
Visual code keypoint struct.
float x
X coordinate of the keypoint relative to source image - range <0,1>
float y
Y coordinate of the keypoint relative to source image - range <0,1>
Union of detection data types (type-specific fields only)
SFEPalmDetectionData palm
Palm detection data.
SFEPersonDetectionData person
Person detection data.
SFEIrisDetectionData iris
Iris detection data.
SFEVisualCodeDetectionData visual_code
Visual code detection data.
SFEObjectDetectionData object
Object detection data.
SFETattooDetectionData tattoo
Tattoo detection data.
SFEFaceDetectionData face
Face detection data.