-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathgstzedmeta.h
576 lines (524 loc) · 23.4 KB
/
gstzedmeta.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
// /////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// /////////////////////////////////////////////////////////////////////////
#ifndef GSTZEDMETA_H
#define GSTZEDMETA_H
#include <gst/gst.h>
#include <vector>
G_BEGIN_DECLS
typedef struct _GstZedSrcMeta GstZedSrcMeta;
typedef struct _ZedInfo ZedInfo;
typedef struct _ZedPose ZedPose;
typedef struct _ZedSensors ZedSensors;
typedef struct _ZedImu ZedImu;
typedef struct _ZedMag ZedMag;
typedef struct _ZedEnv ZedEnv;
typedef struct _ZedCamTemp ZedCamTemp;
typedef struct _ZedObjectData ZedObjectData;
struct _ZedInfo {
gint cam_model;
gint stream_type;
guint grab_single_frame_width;
guint grab_single_frame_height;
};
struct _ZedPose {
gboolean pose_avail;
gint pos_tracking_state;
gfloat pos[3];
gfloat orient[3];
};
struct _ZedImu {
gboolean imu_avail;
gfloat acc[3];
gfloat gyro[3];
gfloat temp;
};
struct _ZedMag {
gboolean mag_avail;
gfloat mag[3];
};
struct _ZedEnv {
gboolean env_avail;
gfloat press;
gfloat temp;
};
struct _ZedCamTemp {
gboolean temp_avail;
gfloat temp_cam_left;
gfloat temp_cam_right;
};
struct _ZedSensors {
gboolean sens_avail;
ZedImu imu;
ZedMag mag;
ZedEnv env;
ZedCamTemp temp;
};
enum class OBJECT_CLASS {
PERSON = 0, /**< For people detection */
VEHICLE = 1, /**< For vehicle detection. It can be cars, trucks, buses, motorcycles etc */
BAG = 2, /**< For bag detection (backpack, handbag, suitcase) */
ANIMAL = 3, /**< For animal detection (cow, sheep, horse, dog, cat, bird, etc) */
ELECTRONICS = 4, /**< For electronic device detection (cellphone, laptop, etc) */
FRUIT_VEGETABLE = 5, /**< For fruit and vegetable detection (banana, apple, orange, carrot, etc) */
SPORT = 6, /**< For sport-related object detection (sportball) */
LAST
};
enum class OBJECT_SUBCLASS {
PERSON = 0, /**< PERSON / PERSON_BODY */
PERSON_HEAD = 22, /**< PERSON */
BICYCLE = 1, /**< VEHICLE */
CAR = 2, /**< VEHICLE */
MOTORBIKE = 3, /**< VEHICLE */
BUS = 4, /**< VEHICLE */
TRUCK = 5, /**< VEHICLE */
BOAT = 6, /**< VEHICLE */
BACKPACK = 7, /**< BAG */
HANDBAG = 8, /**< BAG */
SUITCASE = 9, /**< BAG */
BIRD = 10, /**< ANIMAL */
CAT = 11, /**< ANIMAL */
DOG = 12, /**< ANIMAL */
HORSE = 13, /**< ANIMAL */
SHEEP = 14, /**< ANIMAL */
COW = 15, /**< ANIMAL */
CELLPHONE = 16, /**< ELECTRONICS */
LAPTOP = 17, /**< ELECTRONICS */
BANANA = 18, /**< FRUIT/VEGETABLE */
APPLE = 19, /**< FRUIT/VEGETABLE */
ORANGE = 20, /**< FRUIT/VEGETABLE */
CARROT = 21, /**< FRUIT/VEGETABLE */
SPORTSBALL = 23, /**< SPORT */
LAST
};
enum class OBJECT_TRACKING_STATE {
OFF, /**< The tracking is not yet initialized, the object ID is not usable */
OK, /**< The object is tracked */
SEARCHING, /**< The object couldn't be detected in the image and is potentially occluded, the trajectory is estimated */
TERMINATE, /**< This is the last searching state of the track, the track will be deleted in the next retreiveObject */
LAST
};
enum class OBJECT_ACTION_STATE {
IDLE = 0, /**< The object is staying static. */
MOVING = 1, /**< The object is moving. */
LAST
};
struct _ZedObjectData {
gint id;
OBJECT_CLASS label;
OBJECT_SUBCLASS sublabel;
OBJECT_TRACKING_STATE tracking_state;
OBJECT_ACTION_STATE action_state;
gfloat confidence;
gfloat position[3];
gfloat position_covariance[6];
gfloat velocity[3];
unsigned int bounding_box_2d[4][2];
/* 3D bounding box of the person represented as eight 3D points
1 ------ 2
/ /|
0 ------ 3 |
| Object | 6
| |/
4 ------ 7
*/
gfloat bounding_box_3d[8][3];
gfloat dimensions[3]; // 3D object dimensions: width, height, length
gboolean skeletons_avail;
gint skel_format; // indicates if it's 18, 34, 38, or 70 skeleton model
gfloat keypoint_2d[70][2]; // Negative coordinates -> point not valid
gfloat keypoint_3d[70][3]; // Nan coordinates -> point not valid
gfloat head_bounding_box_2d[4][2];
gfloat head_bounding_box_3d[8][3];
gfloat head_position[3];
};
struct _GstZedSrcMeta {
GstMeta meta;
ZedInfo info;
ZedPose pose;
ZedSensors sens;
gboolean od_enabled;
guint8 obj_count;
guint64 frame_id;
ZedObjectData objects[256];
};
namespace skeleton {
enum class BODY_18_PARTS {
NOSE = 0,
NECK = 1,
RIGHT_SHOULDER = 2,
RIGHT_ELBOW = 3,
RIGHT_WRIST = 4,
LEFT_SHOULDER = 5,
LEFT_ELBOW = 6,
LEFT_WRIST = 7,
RIGHT_HIP = 8,
RIGHT_KNEE = 9,
RIGHT_ANKLE = 10,
LEFT_HIP = 11,
LEFT_KNEE = 12,
LEFT_ANKLE = 13,
RIGHT_EYE = 14,
LEFT_EYE = 15,
RIGHT_EAR = 16,
LEFT_EAR = 17,
LAST = 18
};
inline int getIdx_18(BODY_18_PARTS part) { return static_cast<int>(part); }
enum class BODY_34_PARTS {
PELVIS = 0,
NAVAL_SPINE = 1,
CHEST_SPINE = 2,
NECK = 3,
LEFT_CLAVICLE = 4,
LEFT_SHOULDER = 5,
LEFT_ELBOW = 6,
LEFT_WRIST = 7,
LEFT_HAND = 8,
LEFT_HANDTIP = 9,
LEFT_THUMB = 10,
RIGHT_CLAVICLE = 11,
RIGHT_SHOULDER = 12,
RIGHT_ELBOW = 13,
RIGHT_WRIST = 14,
RIGHT_HAND = 15,
RIGHT_HANDTIP = 16,
RIGHT_THUMB = 17,
LEFT_HIP = 18,
LEFT_KNEE = 19,
LEFT_ANKLE = 20,
LEFT_FOOT = 21,
RIGHT_HIP = 22,
RIGHT_KNEE = 23,
RIGHT_ANKLE = 24,
RIGHT_FOOT = 25,
HEAD = 26,
NOSE = 27,
LEFT_EYE = 28,
LEFT_EAR = 29,
RIGHT_EYE = 30,
RIGHT_EAR = 31,
LEFT_HEEL = 32,
RIGHT_HEEL = 33,
LAST = 34
};
inline int getIdx_34(BODY_34_PARTS part) { return static_cast<int>(part); }
enum class BODY_38_PARTS {
PELVIS = 0,
SPINE_1 = 1,
SPINE_2 = 2,
SPINE_3 = 3,
NECK = 4,
NOSE = 5,
LEFT_EYE = 6,
RIGHT_EYE = 7,
LEFT_EAR = 8,
RIGHT_EAR = 9,
LEFT_CLAVICLE = 10,
RIGHT_CLAVICLE = 11,
LEFT_SHOULDER = 12,
RIGHT_SHOULDER = 13,
LEFT_ELBOW = 14,
RIGHT_ELBOW = 15,
LEFT_WRIST = 16,
RIGHT_WRIST = 17,
LEFT_HIP = 18,
RIGHT_HIP = 19,
LEFT_KNEE = 20,
RIGHT_KNEE = 21,
LEFT_ANKLE = 22,
RIGHT_ANKLE = 23,
LEFT_BIG_TOE = 24,
RIGHT_BIG_TOE = 25,
LEFT_SMALL_TOE = 26,
RIGHT_SMALL_TOE = 27,
LEFT_HEEL = 28,
RIGHT_HEEL = 29,
// Hands
LEFT_HAND_THUMB_4 = 30, // tip
RIGHT_HAND_THUMB_4 = 31,
LEFT_HAND_INDEX_1 = 32, // knuckle
RIGHT_HAND_INDEX_1 = 33,
LEFT_HAND_MIDDLE_4 = 34, // tip
RIGHT_HAND_MIDDLE_4 = 35,
LEFT_HAND_PINKY_1 = 36, // knuckle
RIGHT_HAND_PINKY_1 = 37,
LAST = 38
};
inline int getIdx_38(BODY_38_PARTS part) { return static_cast<int>(part); }
enum class BODY_70_PARTS {
PELVIS = 0,
SPINE_1 = 1,
SPINE_2 = 2,
SPINE_3 = 3,
NECK = 4,
NOSE = 5,
LEFT_EYE = 6,
RIGHT_EYE = 7,
LEFT_EAR = 8,
RIGHT_EAR = 9,
LEFT_CLAVICLE = 10,
RIGHT_CLAVICLE = 11,
LEFT_SHOULDER = 12,
RIGHT_SHOULDER = 13,
LEFT_ELBOW = 14,
RIGHT_ELBOW = 15,
LEFT_WRIST = 16,
RIGHT_WRIST = 17,
LEFT_HIP = 18,
RIGHT_HIP = 19,
LEFT_KNEE = 20,
RIGHT_KNEE = 21,
LEFT_ANKLE = 22,
RIGHT_ANKLE = 23,
LEFT_BIG_TOE = 24,
RIGHT_BIG_TOE = 25,
LEFT_SMALL_TOE = 26,
RIGHT_SMALL_TOE = 27,
LEFT_HEEL = 28,
RIGHT_HEEL = 29,
// Hands
// Left
LEFT_HAND_THUMB_1 = 30,
LEFT_HAND_THUMB_2 = 31,
LEFT_HAND_THUMB_3 = 32,
LEFT_HAND_THUMB_4 = 33, // tip
LEFT_HAND_INDEX_1 = 34, // knuckle
LEFT_HAND_INDEX_2 = 35,
LEFT_HAND_INDEX_3 = 36,
LEFT_HAND_INDEX_4 = 37, // tip
LEFT_HAND_MIDDLE_1 = 38,
LEFT_HAND_MIDDLE_2 = 39,
LEFT_HAND_MIDDLE_3 = 40,
LEFT_HAND_MIDDLE_4 = 41,
LEFT_HAND_RING_1 = 42,
LEFT_HAND_RING_2 = 43,
LEFT_HAND_RING_3 = 44,
LEFT_HAND_RING_4 = 45,
LEFT_HAND_PINKY_1 = 46,
LEFT_HAND_PINKY_2 = 47,
LEFT_HAND_PINKY_3 = 48,
LEFT_HAND_PINKY_4 = 49,
// Right
RIGHT_HAND_THUMB_1 = 50,
RIGHT_HAND_THUMB_2 = 51,
RIGHT_HAND_THUMB_3 = 52,
RIGHT_HAND_THUMB_4 = 53,
RIGHT_HAND_INDEX_1 = 54,
RIGHT_HAND_INDEX_2 = 55,
RIGHT_HAND_INDEX_3 = 56,
RIGHT_HAND_INDEX_4 = 57,
RIGHT_HAND_MIDDLE_1 = 58,
RIGHT_HAND_MIDDLE_2 = 59,
RIGHT_HAND_MIDDLE_3 = 60,
RIGHT_HAND_MIDDLE_4 = 61,
RIGHT_HAND_RING_1 = 62,
RIGHT_HAND_RING_2 = 63,
RIGHT_HAND_RING_3 = 64,
RIGHT_HAND_RING_4 = 65,
RIGHT_HAND_PINKY_1 = 66,
RIGHT_HAND_PINKY_2 = 67,
RIGHT_HAND_PINKY_3 = 68,
RIGHT_HAND_PINKY_4 = 69,
LAST = 70
};
inline int getIdx_70(BODY_70_PARTS part) { return static_cast<int>(part); }
const std::vector<std::pair<BODY_18_PARTS, BODY_18_PARTS>> BODY_18_BONES{{BODY_18_PARTS::NOSE, BODY_18_PARTS::NECK},
{BODY_18_PARTS::NECK, BODY_18_PARTS::RIGHT_SHOULDER},
{BODY_18_PARTS::RIGHT_SHOULDER, BODY_18_PARTS::RIGHT_ELBOW},
{BODY_18_PARTS::RIGHT_ELBOW, BODY_18_PARTS::RIGHT_WRIST},
{BODY_18_PARTS::NECK, BODY_18_PARTS::LEFT_SHOULDER},
{BODY_18_PARTS::LEFT_SHOULDER, BODY_18_PARTS::LEFT_ELBOW},
{BODY_18_PARTS::LEFT_ELBOW, BODY_18_PARTS::LEFT_WRIST},
{BODY_18_PARTS::RIGHT_SHOULDER, BODY_18_PARTS::RIGHT_HIP},
{BODY_18_PARTS::RIGHT_HIP, BODY_18_PARTS::RIGHT_KNEE},
{BODY_18_PARTS::RIGHT_KNEE, BODY_18_PARTS::RIGHT_ANKLE},
{BODY_18_PARTS::LEFT_SHOULDER, BODY_18_PARTS::LEFT_HIP},
{BODY_18_PARTS::LEFT_HIP, BODY_18_PARTS::LEFT_KNEE},
{BODY_18_PARTS::LEFT_KNEE, BODY_18_PARTS::LEFT_ANKLE},
{BODY_18_PARTS::RIGHT_SHOULDER, BODY_18_PARTS::LEFT_SHOULDER},
{BODY_18_PARTS::RIGHT_HIP, BODY_18_PARTS::LEFT_HIP},
{BODY_18_PARTS::NOSE, BODY_18_PARTS::RIGHT_EYE},
{BODY_18_PARTS::RIGHT_EYE, BODY_18_PARTS::RIGHT_EAR},
{BODY_18_PARTS::NOSE, BODY_18_PARTS::LEFT_EYE},
{BODY_18_PARTS::LEFT_EYE, BODY_18_PARTS::LEFT_EAR}};
const std::vector<std::pair<BODY_34_PARTS, BODY_34_PARTS>> BODY_34_BONES{{BODY_34_PARTS::PELVIS, BODY_34_PARTS::NAVAL_SPINE},
{BODY_34_PARTS::NAVAL_SPINE, BODY_34_PARTS::CHEST_SPINE},
{BODY_34_PARTS::CHEST_SPINE, BODY_34_PARTS::LEFT_CLAVICLE},
{BODY_34_PARTS::LEFT_CLAVICLE, BODY_34_PARTS::LEFT_SHOULDER},
{BODY_34_PARTS::LEFT_SHOULDER, BODY_34_PARTS::LEFT_ELBOW},
{BODY_34_PARTS::LEFT_ELBOW, BODY_34_PARTS::LEFT_WRIST},
{BODY_34_PARTS::LEFT_WRIST, BODY_34_PARTS::LEFT_HAND},
{BODY_34_PARTS::LEFT_HAND, BODY_34_PARTS::LEFT_HANDTIP},
{BODY_34_PARTS::LEFT_WRIST, BODY_34_PARTS::LEFT_THUMB},
{BODY_34_PARTS::CHEST_SPINE, BODY_34_PARTS::RIGHT_CLAVICLE},
{BODY_34_PARTS::RIGHT_CLAVICLE, BODY_34_PARTS::RIGHT_SHOULDER},
{BODY_34_PARTS::RIGHT_SHOULDER, BODY_34_PARTS::RIGHT_ELBOW},
{BODY_34_PARTS::RIGHT_ELBOW, BODY_34_PARTS::RIGHT_WRIST},
{BODY_34_PARTS::RIGHT_WRIST, BODY_34_PARTS::RIGHT_HAND},
{BODY_34_PARTS::RIGHT_HAND, BODY_34_PARTS::RIGHT_HANDTIP},
{BODY_34_PARTS::RIGHT_WRIST, BODY_34_PARTS::RIGHT_THUMB},
{BODY_34_PARTS::PELVIS, BODY_34_PARTS::LEFT_HIP},
{BODY_34_PARTS::LEFT_HIP, BODY_34_PARTS::LEFT_KNEE},
{BODY_34_PARTS::LEFT_KNEE, BODY_34_PARTS::LEFT_ANKLE},
{BODY_34_PARTS::LEFT_ANKLE, BODY_34_PARTS::LEFT_FOOT},
{BODY_34_PARTS::PELVIS, BODY_34_PARTS::RIGHT_HIP},
{BODY_34_PARTS::RIGHT_HIP, BODY_34_PARTS::RIGHT_KNEE},
{BODY_34_PARTS::RIGHT_KNEE, BODY_34_PARTS::RIGHT_ANKLE},
{BODY_34_PARTS::RIGHT_ANKLE, BODY_34_PARTS::RIGHT_FOOT},
{BODY_34_PARTS::CHEST_SPINE, BODY_34_PARTS::NECK},
{BODY_34_PARTS::NECK, BODY_34_PARTS::HEAD},
{BODY_34_PARTS::HEAD, BODY_34_PARTS::NOSE},
{BODY_34_PARTS::NOSE, BODY_34_PARTS::LEFT_EYE},
{BODY_34_PARTS::LEFT_EYE, BODY_34_PARTS::LEFT_EAR},
{BODY_34_PARTS::NOSE, BODY_34_PARTS::RIGHT_EYE},
{BODY_34_PARTS::RIGHT_EYE, BODY_34_PARTS::RIGHT_EAR},
{BODY_34_PARTS::LEFT_ANKLE, BODY_34_PARTS::LEFT_HEEL},
{BODY_34_PARTS::RIGHT_ANKLE, BODY_34_PARTS::RIGHT_HEEL},
{BODY_34_PARTS::LEFT_HEEL, BODY_34_PARTS::LEFT_FOOT},
{BODY_34_PARTS::RIGHT_HEEL, BODY_34_PARTS::RIGHT_FOOT}};
const std::vector<std::pair<BODY_38_PARTS, BODY_38_PARTS>> BODY_38_BONES{
{BODY_38_PARTS::PELVIS, BODY_38_PARTS::SPINE_1},
{BODY_38_PARTS::SPINE_1, BODY_38_PARTS::SPINE_2},
{BODY_38_PARTS::SPINE_2, BODY_38_PARTS::SPINE_3},
{BODY_38_PARTS::SPINE_3, BODY_38_PARTS::NECK},
// Face
{BODY_38_PARTS::NECK, BODY_38_PARTS::NOSE},
{BODY_38_PARTS::NOSE, BODY_38_PARTS::LEFT_EYE},
{BODY_38_PARTS::LEFT_EYE, BODY_38_PARTS::LEFT_EAR},
{BODY_38_PARTS::NOSE, BODY_38_PARTS::RIGHT_EYE},
{BODY_38_PARTS::RIGHT_EYE, BODY_38_PARTS::RIGHT_EAR},
// Left arm
{BODY_38_PARTS::SPINE_3, BODY_38_PARTS::LEFT_CLAVICLE},
{BODY_38_PARTS::LEFT_CLAVICLE, BODY_38_PARTS::LEFT_SHOULDER},
{BODY_38_PARTS::LEFT_SHOULDER, BODY_38_PARTS::LEFT_ELBOW},
{BODY_38_PARTS::LEFT_ELBOW, BODY_38_PARTS::LEFT_WRIST},
{BODY_38_PARTS::LEFT_WRIST, BODY_38_PARTS::LEFT_HAND_THUMB_4},
{BODY_38_PARTS::LEFT_WRIST, BODY_38_PARTS::LEFT_HAND_INDEX_1},
{BODY_38_PARTS::LEFT_WRIST, BODY_38_PARTS::LEFT_HAND_MIDDLE_4},
{BODY_38_PARTS::LEFT_WRIST, BODY_38_PARTS::LEFT_HAND_PINKY_1},
// Right arm
{BODY_38_PARTS::SPINE_3, BODY_38_PARTS::RIGHT_CLAVICLE},
{BODY_38_PARTS::RIGHT_CLAVICLE, BODY_38_PARTS::RIGHT_SHOULDER},
{BODY_38_PARTS::RIGHT_SHOULDER, BODY_38_PARTS::RIGHT_ELBOW},
{BODY_38_PARTS::RIGHT_ELBOW, BODY_38_PARTS::RIGHT_WRIST},
{BODY_38_PARTS::RIGHT_WRIST, BODY_38_PARTS::RIGHT_HAND_THUMB_4},
{BODY_38_PARTS::RIGHT_WRIST, BODY_38_PARTS::RIGHT_HAND_INDEX_1},
{BODY_38_PARTS::RIGHT_WRIST, BODY_38_PARTS::RIGHT_HAND_MIDDLE_4},
{BODY_38_PARTS::RIGHT_WRIST, BODY_38_PARTS::RIGHT_HAND_PINKY_1},
// Left leg
{BODY_38_PARTS::PELVIS, BODY_38_PARTS::LEFT_HIP},
{BODY_38_PARTS::LEFT_HIP, BODY_38_PARTS::LEFT_KNEE},
{BODY_38_PARTS::LEFT_KNEE, BODY_38_PARTS::LEFT_ANKLE},
{BODY_38_PARTS::LEFT_ANKLE, BODY_38_PARTS::LEFT_HEEL},
{BODY_38_PARTS::LEFT_ANKLE, BODY_38_PARTS::LEFT_BIG_TOE},
{BODY_38_PARTS::LEFT_ANKLE, BODY_38_PARTS::LEFT_SMALL_TOE},
// Right leg
{BODY_38_PARTS::PELVIS, BODY_38_PARTS::RIGHT_HIP},
{BODY_38_PARTS::RIGHT_HIP, BODY_38_PARTS::RIGHT_KNEE},
{BODY_38_PARTS::RIGHT_KNEE, BODY_38_PARTS::RIGHT_ANKLE},
{BODY_38_PARTS::RIGHT_ANKLE, BODY_38_PARTS::RIGHT_HEEL},
{BODY_38_PARTS::RIGHT_ANKLE, BODY_38_PARTS::RIGHT_BIG_TOE},
{BODY_38_PARTS::RIGHT_ANKLE, BODY_38_PARTS::RIGHT_SMALL_TOE},
};
const std::vector<std::pair<BODY_70_PARTS, BODY_70_PARTS>> BODY_70_BONES{
{BODY_70_PARTS::PELVIS, BODY_70_PARTS::SPINE_1},
{BODY_70_PARTS::SPINE_1, BODY_70_PARTS::SPINE_2},
{BODY_70_PARTS::SPINE_2, BODY_70_PARTS::SPINE_3},
{BODY_70_PARTS::SPINE_3, BODY_70_PARTS::NECK},
// Face
{BODY_70_PARTS::NECK, BODY_70_PARTS::NOSE},
{BODY_70_PARTS::NOSE, BODY_70_PARTS::LEFT_EYE},
{BODY_70_PARTS::LEFT_EYE, BODY_70_PARTS::LEFT_EAR},
{BODY_70_PARTS::NOSE, BODY_70_PARTS::RIGHT_EYE},
{BODY_70_PARTS::RIGHT_EYE, BODY_70_PARTS::RIGHT_EAR},
// Left arm
{BODY_70_PARTS::SPINE_3, BODY_70_PARTS::LEFT_CLAVICLE},
{BODY_70_PARTS::LEFT_CLAVICLE, BODY_70_PARTS::LEFT_SHOULDER},
{BODY_70_PARTS::LEFT_SHOULDER, BODY_70_PARTS::LEFT_ELBOW},
{BODY_70_PARTS::LEFT_ELBOW, BODY_70_PARTS::LEFT_WRIST},
// Left hand
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_THUMB_1},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_THUMB_2},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_THUMB_3},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_THUMB_4},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_INDEX_1},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_INDEX_2},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_INDEX_3},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_INDEX_4},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_MIDDLE_1},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_MIDDLE_2},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_MIDDLE_3},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_MIDDLE_4},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_PINKY_1},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_PINKY_2},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_PINKY_3},
{BODY_70_PARTS::LEFT_WRIST, BODY_70_PARTS::LEFT_HAND_PINKY_4},
// Right arm
{BODY_70_PARTS::SPINE_3, BODY_70_PARTS::RIGHT_CLAVICLE},
{BODY_70_PARTS::RIGHT_CLAVICLE, BODY_70_PARTS::RIGHT_SHOULDER},
{BODY_70_PARTS::RIGHT_SHOULDER, BODY_70_PARTS::RIGHT_ELBOW},
{BODY_70_PARTS::RIGHT_ELBOW, BODY_70_PARTS::RIGHT_WRIST},
// Right hand
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_THUMB_1},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_THUMB_2},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_THUMB_3},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_THUMB_4},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_INDEX_1},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_INDEX_2},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_INDEX_3},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_INDEX_4},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_MIDDLE_1},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_MIDDLE_2},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_MIDDLE_3},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_MIDDLE_4},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_PINKY_1},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_PINKY_2},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_PINKY_3},
{BODY_70_PARTS::RIGHT_WRIST, BODY_70_PARTS::RIGHT_HAND_PINKY_4},
// Left leg
{BODY_70_PARTS::PELVIS, BODY_70_PARTS::LEFT_HIP},
{BODY_70_PARTS::LEFT_HIP, BODY_70_PARTS::LEFT_KNEE},
{BODY_70_PARTS::LEFT_KNEE, BODY_70_PARTS::LEFT_ANKLE},
{BODY_70_PARTS::LEFT_ANKLE, BODY_70_PARTS::LEFT_HEEL},
{BODY_70_PARTS::LEFT_ANKLE, BODY_70_PARTS::LEFT_BIG_TOE},
{BODY_70_PARTS::LEFT_ANKLE, BODY_70_PARTS::LEFT_SMALL_TOE},
// Right leg
{BODY_70_PARTS::PELVIS, BODY_70_PARTS::RIGHT_HIP},
{BODY_70_PARTS::RIGHT_HIP, BODY_70_PARTS::RIGHT_KNEE},
{BODY_70_PARTS::RIGHT_KNEE, BODY_70_PARTS::RIGHT_ANKLE},
{BODY_70_PARTS::RIGHT_ANKLE, BODY_70_PARTS::RIGHT_HEEL},
{BODY_70_PARTS::RIGHT_ANKLE, BODY_70_PARTS::RIGHT_BIG_TOE},
{BODY_70_PARTS::RIGHT_ANKLE, BODY_70_PARTS::RIGHT_SMALL_TOE},
};
} // namespace skeleton
GST_EXPORT
GType gst_zed_src_meta_api_get_type(void);
#define GST_ZED_SRC_META_API_TYPE (gst_zed_src_meta_api_get_type())
#define GST_ZED_SRC_META_INFO (gst_zed_src_meta_get_info())
#define gst_buffer_get_zed_src_meta(b) ((GstZedSrcMeta *) gst_buffer_get_meta((b), GST_ZED_SRC_META_API_TYPE))
/* implementation */
GST_EXPORT
const GstMetaInfo *gst_zed_src_meta_get_info(void);
#define GST_ZED_SRC_META_INFO (gst_zed_src_meta_get_info())
GST_EXPORT
GstZedSrcMeta *gst_buffer_add_zed_src_meta(GstBuffer *buffer, ZedInfo &info, ZedPose &pose, ZedSensors &sens, gboolean od_enabled, guint8 obj_count,
ZedObjectData *objects, guint64 frame_id);
G_END_DECLS
#endif