ailia  1.3.0.0
ailia_pose_estimator.h
Go to the documentation of this file.
1 
14 #if !defined(INCLUDED_AILIA_POSE_ESTIMATOR)
15 #define INCLUDED_AILIA_POSE_ESTIMATOR
16 
17 /* コアライブラリ */
18 
19 #include "ailia.h"
20 #include "ailia_format.h"
21 
22 /* 呼び出し規約 */
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /****************************************************************
29  * 検出オブジェクトのインスタンス
30  **/
31 
32 struct AILIAPoseEstimator;
33 
34 /****************************************************************
35  * 物体情報
36  **/
37 
45 #define AILIA_POSE_ESTIMATOR_ALGORITHM_ACCULUS_POSE (0)
46 
53 #define AILIA_POSE_ESTIMATOR_ALGORITHM_ACCULUS_FACE (1)
54 
61 #define AILIA_POSE_ESTIMATOR_ALGORITHM_ACCULUS_UPPOSE (2)
62 
69 #define AILIA_POSE_ESTIMATOR_ALGORITHM_ACCULUS_UPPOSE_FPGA (3)
70 
77 #define AILIA_POSE_ESTIMATOR_ALGORITHM_ACCULUS_HAND (5)
78 
85 #define AILIA_POSE_ESTIMATOR_ALGORITHM_OPEN_POSE (10)
86 
93 #define AILIA_POSE_ESTIMATOR_ALGORITHM_LW_HUMAN_POSE (11)
94 
101 #define AILIA_POSE_ESTIMATOR_ALGORITHM_OPEN_POSE_SINGLE_SCALE (12)
102 
103 /* 骨格検出 関節点 定義 */
104 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_NOSE (0)
105 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_EYE_LEFT (1)
106 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_EYE_RIGHT (2)
107 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_EAR_LEFT (3)
108 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_EAR_RIGHT (4)
109 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_SHOULDER_LEFT (5)
110 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_SHOULDER_RIGHT (6)
111 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_ELBOW_LEFT (7)
112 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_ELBOW_RIGHT (8)
113 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_WRIST_LEFT (9)
114 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_WRIST_RIGHT (10)
115 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_HIP_LEFT (11)
116 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_HIP_RIGHT (12)
117 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_KNEE_LEFT (13)
118 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_KNEE_RIGHT (14)
119 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_ANKLE_LEFT (15)
120 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_ANKLE_RIGHT (16)
121 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_SHOULDER_CENTER (17)
122 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_BODY_CENTER (18)
123 
130 #define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_CNT (19)
131 
132 /* 顔特徴点検出 定義 */
140 #define AILIA_POSE_ESTIMATOR_FACE_KEYPOINT_CNT (68)
141 
142 /* 近接上半身姿勢検出 関節点 定義 */
143 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_NOSE (0)
144 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_EYE_LEFT (1)
145 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_EYE_RIGHT (2)
146 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_EAR_LEFT (3)
147 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_EAR_RIGHT (4)
148 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_SHOULDER_LEFT (5)
149 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_SHOULDER_RIGHT (6)
150 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_ELBOW_LEFT (7)
151 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_ELBOW_RIGHT (8)
152 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_WRIST_LEFT (9)
153 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_WRIST_RIGHT (10)
154 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_HIP_LEFT (11)
155 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_HIP_RIGHT (12)
156 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_SHOULDER_CENTER (13)
157 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_BODY_CENTER (14)
158 
165 #define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_CNT (15)
166 
167 /* 手姿勢検出 点 定義 */
175 #define AILIA_POSE_ESTIMATOR_HAND_KEYPOINT_CNT (21)
176 
185  float x;
193  float y;
202  float z_local;
211  float score;
222 
230 #define AILIA_POSE_ESTIMATOR_OBJECT_POSE_VERSION (1)
247  float total_score;
263  int id;
273  float angle[3];
275 
283 #define AILIA_POSE_ESTIMATOR_OBJECT_FACE_VERSION (1)
300  float total_score;
302 
310 #define AILIA_POSE_ESTIMATOR_OBJECT_UPPOSE_VERSION (1)
327  float total_score;
343  int id;
353  float angle[3];
355 
363 #define AILIA_POSE_ESTIMATOR_OBJECT_HAND_VERSION (1)
380  float total_score;
382 
383 /****************************************************************
384  * 骨格検出・顔特徴点検出API
385  **/
386 
408 int AILIA_API ailiaCreatePoseEstimator(struct AILIAPoseEstimator** pose_estimator, struct AILIANetwork* net, unsigned int algorithm);
409 
419 void AILIA_API ailiaDestroyPoseEstimator(struct AILIAPoseEstimator* pose_estimator);
420 
437 int AILIA_API ailiaPoseEstimatorSetThreshold(struct AILIAPoseEstimator* pose_estimator, float threshold);
438 
462 int AILIA_API ailiaPoseEstimatorCompute(struct AILIAPoseEstimator* pose_estimator, const void* src, unsigned int src_stride, unsigned int src_width, unsigned int src_height, unsigned int src_format);
463 
479 int AILIA_API ailiaPoseEstimatorGetObjectCount(struct AILIAPoseEstimator* pose_estimator, unsigned int* obj_count);
480 
500 int AILIA_API ailiaPoseEstimatorGetObjectPose(struct AILIAPoseEstimator* pose_estimator, AILIAPoseEstimatorObjectPose* obj, unsigned int obj_idx, unsigned int version);
501 
521 int AILIA_API ailiaPoseEstimatorGetObjectFace(struct AILIAPoseEstimator* pose_estimator, AILIAPoseEstimatorObjectFace* obj, unsigned int obj_idx, unsigned int version);
522 
542 int AILIA_API ailiaPoseEstimatorGetObjectUpPose(struct AILIAPoseEstimator* pose_estimator, AILIAPoseEstimatorObjectUpPose* obj, unsigned int obj_idx, unsigned int version);
543 
563 int AILIA_API ailiaPoseEstimatorGetObjectHand(struct AILIAPoseEstimator* pose_estimator, AILIAPoseEstimatorObjectHand* obj, unsigned int obj_idx, unsigned int version);
564 
565 #ifdef __cplusplus
566 }
567 #endif
568 #endif /* !defined(INCLUDED_AILIA_POSE_ESTIMATOR) */
Definition: ailia_pose_estimator.h:177
int AILIA_API ailiaPoseEstimatorGetObjectFace(struct AILIAPoseEstimator *pose_estimator, AILIAPoseEstimatorObjectFace *obj, unsigned int obj_idx, unsigned int version)
Gets the results of the human face landmarks extraction.
Definition: ailia_pose_estimator.h:311
int num_valid_points
Definition: ailia_pose_estimator.h:255
float score
Definition: ailia_pose_estimator.h:211
int interpolated
Definition: ailia_pose_estimator.h:220
#define AILIA_POSE_ESTIMATOR_FACE_KEYPOINT_CNT
Definition: ailia_pose_estimator.h:140
AILIAPoseEstimatorKeypoint points[AILIA_POSE_ESTIMATOR_HAND_KEYPOINT_CNT]
Definition: ailia_pose_estimator.h:372
int id
Definition: ailia_pose_estimator.h:263
AILIAPoseEstimatorKeypoint points[AILIA_POSE_ESTIMATOR_FACE_KEYPOINT_CNT]
Definition: ailia_pose_estimator.h:292
AILIAPoseEstimatorKeypoint points[AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_CNT]
Definition: ailia_pose_estimator.h:239
int id
Definition: ailia_pose_estimator.h:343
struct _AILIAPoseEstimatorObjectFace AILIAPoseEstimatorObjectFace
Definition: ailia_pose_estimator.h:364
float total_score
Definition: ailia_pose_estimator.h:247
float angle[3]
Definition: ailia_pose_estimator.h:273
float total_score
Definition: ailia_pose_estimator.h:300
inference library
struct _AILIAPoseEstimatorObjectHand AILIAPoseEstimatorObjectHand
float total_score
Definition: ailia_pose_estimator.h:327
int AILIA_API ailiaPoseEstimatorGetObjectHand(struct AILIAPoseEstimator *pose_estimator, AILIAPoseEstimatorObjectHand *obj, unsigned int obj_idx, unsigned int version)
Gets the results of the human hand estimation.
float z_local
Definition: ailia_pose_estimator.h:202
struct _AILIAPoseEstimatorObjectPose AILIAPoseEstimatorObjectPose
int num_valid_points
Definition: ailia_pose_estimator.h:335
int AILIA_API ailiaPoseEstimatorCompute(struct AILIAPoseEstimator *pose_estimator, const void *src, unsigned int src_stride, unsigned int src_width, unsigned int src_height, unsigned int src_format)
Performs human pose estimation and human face landmarks extraction.
int AILIA_API ailiaPoseEstimatorGetObjectPose(struct AILIAPoseEstimator *pose_estimator, AILIAPoseEstimatorObjectPose *obj, unsigned int obj_idx, unsigned int version)
Gets the results of the human pose estimation.
struct _AILIAPoseEstimatorObjectUpPose AILIAPoseEstimatorObjectUpPose
float y
Definition: ailia_pose_estimator.h:193
struct _AILIAPoseEstimatorKeypoint AILIAPoseEstimatorKeypoint
Definition: ailia_pose_estimator.h:231
#define AILIA_POSE_ESTIMATOR_HAND_KEYPOINT_CNT
Definition: ailia_pose_estimator.h:175
#define AILIA_API
Definition: ailia.h:27
void AILIA_API ailiaDestroyPoseEstimator(struct AILIAPoseEstimator *pose_estimator)
Destroys the estimator instance.
int AILIA_API ailiaCreatePoseEstimator(struct AILIAPoseEstimator **pose_estimator, struct AILIANetwork *net, unsigned int algorithm)
Creates a estimator instance.
float x
Definition: ailia_pose_estimator.h:185
#define AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_CNT
Definition: ailia_pose_estimator.h:165
int AILIA_API ailiaPoseEstimatorGetObjectCount(struct AILIAPoseEstimator *pose_estimator, unsigned int *obj_count)
Gets the number of detection results.
AILIA format definition and conversion.
AILIAPoseEstimatorKeypoint points[AILIA_POSE_ESTIMATOR_UPPOSE_KEYPOINT_CNT]
Definition: ailia_pose_estimator.h:319
#define AILIA_POSE_ESTIMATOR_POSE_KEYPOINT_CNT
Definition: ailia_pose_estimator.h:130
int AILIA_API ailiaPoseEstimatorSetThreshold(struct AILIAPoseEstimator *pose_estimator, float threshold)
Set the detection threshold.
Definition: ailia_pose_estimator.h:284
float angle[3]
Definition: ailia_pose_estimator.h:353
int AILIA_API ailiaPoseEstimatorGetObjectUpPose(struct AILIAPoseEstimator *pose_estimator, AILIAPoseEstimatorObjectUpPose *obj, unsigned int obj_idx, unsigned int version)
Gets the results of the human up pose estimation.
float total_score
Definition: ailia_pose_estimator.h:380