KanduAI SDK  1.1
api_types.h
Go to the documentation of this file.
1 #ifndef _API_TYPES_H_
2 #define _API_TYPES_H_
3 
4 typedef struct rf_face_bbox {
5  int ymin;
6  int xmin;
7  int ymax;
8  int xmax;
9  int id;
10 } rf_face_bbox;
11 
12 typedef struct rf_face_bbox_vector {
16 
17 typedef struct rf_float_vector {
18  float* data;
21 
22 typedef struct rf_int_vector {
23  int* data;
26 
27 typedef struct rf_box_struct {
28  int ymin;
29  int xmin;
30  int ymax;
31  int xmax;
32 } rf_box;
33 
34 typedef struct rf_headpose_struct {
35  float pitch;
36  float yaw;
37  float roll;
38 } rf_headpose;
39 
40 typedef struct rf_face_landmarks_struct {
43 
46 
47  int y_nose;
48  int x_nose;
49 
52 
55 
57 
58 typedef struct rf_face_descriptor_struct {
60  float score;
62  float blur;
65 
70 
72 
73 
74 typedef struct rf_error {
77 
78 
79 void* allocate_memory(long bytes);
80 
81 void free_memory(void* memory);
82 
84 
86 
87 #define RF_OBJECT_TYPE_NONE 0
88 #define RF_OBJECT_TYPE_INT 100
89 #define RF_OBJECT_TYPE_FLOAT 200
90 #define RF_OBJECT_TYPE_INT_VECTOR 300
91 #define RF_OBJECT_TYPE_FLOAT_VECTOR 400
92 #define RF_OBJECT_TYPE_STRING 500
93 #define RF_OBJECT_TYPE_OBJECT_LIST 600
94 #define RF_OBJECT_TYPE_OBJECT_MAP 700
95 
96 // forward declaration of rf_object
97 typedef struct rf_object rf_object_type;
98 
99 // rf_strcing
100 typedef struct rf_string {
101  char *value;
103 
104 rf_string_type create_rf_string(const char *val);
106 
107 // rf_object_map
108 typedef struct rf_object_map {
109  void *handle;
111 
112 rf_object_map_type create_rf_object_map(const char **keys, rf_object_type *values, int keys_and_values_len, rf_error_type *error);
115 void get_keys_rf_object_map(rf_object_map_type obj_map, rf_string_type *keys, int *keys_len);
116 void get_values_rf_object_map(rf_object_map_type obj_map, rf_object_type *values, int *values_len);
118 
119 // rf_object_list
120 typedef struct rf_object_list {
124 
127 
128 // rf_object
129 struct rf_object {
130  int type;
131  union {
132  float float_value;
139  } value;
140 };
141 
143 
144 
145 #endif // _API_TYPES_H_
Definition: api_types.h:40
float pitch
Definition: api_types.h:35
int xmax
Definition: api_types.h:31
void get_values_rf_object_map(rf_object_map_type obj_map, rf_object_type *values, int *values_len)
union rf_object::@0 value
int xmin
Definition: api_types.h:29
int y_nose
Definition: api_types.h:47
int error_code
Definition: api_types.h:75
rf_object_type get_element_rf_object_map(rf_object_map_type obj_map, const char *key, rf_error_type *error)
void free_rf_int_vector(rf_int_vector_type rf_vector)
struct rf_box_struct rf_box
Definition: api_types.h:100
rf_face_descriptor * data
Definition: api_types.h:68
rf_headpose headpose
Definition: api_types.h:63
int id
Definition: api_types.h:9
Definition: api_types.h:12
int xmin
Definition: api_types.h:6
Definition: api_types.h:4
char * value
Definition: api_types.h:101
rf_object_list_type object_list_value
Definition: api_types.h:137
int type
Definition: api_types.h:130
void free_rf_object_list(rf_object_list_type val)
struct rf_int_vector rf_int_vector_type
struct rf_float_vector rf_float_vector_type
void * handle
Definition: api_types.h:109
int ymax
Definition: api_types.h:30
rf_object_list_type create_rf_object_list(rf_object_type *values, int values_len, rf_error_type *error)
int y_right_eye
Definition: api_types.h:44
Definition: api_types.h:108
int x_mouth_left
Definition: api_types.h:51
struct rf_object_list rf_object_list_type
int num_elements
Definition: api_types.h:24
struct rf_face_bbox_vector rf_face_bbox_vector
void get_keys_rf_object_map(rf_object_map_type obj_map, rf_string_type *keys, int *keys_len)
int ymin
Definition: api_types.h:28
struct rf_headpose_struct rf_headpose
int int_value
Definition: api_types.h:133
int num_elements
Definition: api_types.h:19
rf_object_type * data
Definition: api_types.h:122
int ymin
Definition: api_types.h:5
Definition: api_types.h:17
float yaw
Definition: api_types.h:36
void free_rf_string(rf_string_type val)
int x_nose
Definition: api_types.h:48
int num_elements
Definition: api_types.h:121
void free_rf_object_map(rf_object_map_type val)
Definition: api_types.h:120
struct rf_face_bbox rf_face_bbox
void free_rf_object(rf_object_type obj)
struct rf_face_descriptor_list_struct rf_face_descriptor_list
Definition: api_types.h:58
rf_float_vector_type float_vector_value
Definition: api_types.h:135
Definition: api_types.h:22
int get_num_elements_rf_object_map(rf_object_map_type obj_map)
int * data
Definition: api_types.h:23
Definition: api_types.h:129
float roll
Definition: api_types.h:37
rf_string_type string_value
Definition: api_types.h:136
void free_rf_face_descriptor_list(rf_face_descriptor_list descriptor_list)
rf_int_vector_type int_vector_value
Definition: api_types.h:134
Definition: api_types.h:66
rf_face_bbox * data
Definition: api_types.h:13
void free_memory(void *memory)
int x_right_eye
Definition: api_types.h:45
int ymax
Definition: api_types.h:7
struct rf_object_map rf_object_map_type
int xmax
Definition: api_types.h:8
void free_rf_float_vector(rf_float_vector_type rf_vector)
struct rf_face_descriptor_struct rf_face_descriptor
rf_box box
Definition: api_types.h:59
Definition: api_types.h:34
int y_mouth_left
Definition: api_types.h:50
int num_elements
Definition: api_types.h:67
int y_mouth_right
Definition: api_types.h:53
void * allocate_memory(long bytes)
struct rf_string rf_string_type
float score
Definition: api_types.h:60
int x_left_eye
Definition: api_types.h:42
int num_elements
Definition: api_types.h:14
Definition: api_types.h:27
float * data
Definition: api_types.h:18
Definition: api_types.h:74
int y_left_eye
Definition: api_types.h:41
float blur
Definition: api_types.h:62
rf_object_map_type create_rf_object_map(const char **keys, rf_object_type *values, int keys_and_values_len, rf_error_type *error)
float float_value
Definition: api_types.h:132
rf_object_map_type object_map_value
Definition: api_types.h:138
rf_face_landmarks landmarks
Definition: api_types.h:61
struct rf_face_landmarks_struct rf_face_landmarks
int x_mouth_right
Definition: api_types.h:54
struct rf_error rf_error_type
rf_string_type create_rf_string(const char *val)