k4a_bt_body_32.h
Go to the documentation of this file.
1
/**
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @author Fabian Reister ( fabian dot reister at kit dot edu )
17
* @date 2022
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <SimoxUtility/color/Color.h>
25
#include <SimoxUtility/meta/enum/EnumNames.hpp>
26
27
/**
28
* Body model taken from https://docs.microsoft.com/en-us/azure/kinect-dk/body-joints and used
29
* with Azure Kinect Body Tracking SDK 1.1.1.
30
*/
31
namespace
armarx::human::pose::model::k4a_bt_body_32
32
{
33
inline
const
std::string
ModelId
=
"K4ABT_BODY_32"
;
34
35
/**
36
* Joints with index as defined in the body model.
37
*/
38
enum class
Joints
39
{
40
Pelvis
,
41
SpineNaval
,
42
SpineChest
,
43
Neck
,
44
ClavicleLeft
,
45
ShoulderLeft
,
46
ElbowLeft
,
47
WristLeft
,
48
HandLeft
,
49
HandtipLeft
,
50
ThumbLeft
,
51
ClavicleRight
,
52
ShoulderRight
,
53
ElbowRight
,
54
WristRight
,
55
HandRight
,
56
HandtipRight
,
57
ThumbRight
,
58
HipLeft
,
59
KneeLeft
,
60
AnkleLeft
,
61
FootLeft
,
62
HipRight
,
63
KneeRight
,
64
AnkleRight
,
65
FootRight
,
66
Head
,
67
Nose
,
68
EyeLeft
,
69
EarLeft
,
70
EyeRight
,
71
EarRight
72
};
73
74
/**
75
* Names of the joints as defined in the body model.
76
*/
77
inline
const
simox::meta::EnumNames<Joints>
JointNames
{{
Joints::Pelvis
,
"Pelvis"
},
78
{
Joints::SpineNaval
,
"SpineNaval"
},
79
{
Joints::SpineChest
,
"SpineChest"
},
80
{
Joints::Neck
,
"Neck"
},
81
{
Joints::ClavicleLeft
,
"ClavicleLeft"
},
82
{
Joints::ShoulderLeft
,
"ShoulderLeft"
},
83
{
Joints::ElbowLeft
,
"ElbowLeft"
},
84
{
Joints::WristLeft
,
"WristLeft"
},
85
{
Joints::HandLeft
,
"HandLeft"
},
86
{
Joints::HandtipLeft
,
"HandtipLeft"
},
87
{
Joints::ThumbLeft
,
"ThumbLeft"
},
88
{
Joints::ClavicleRight
,
"ClavicleRight"
},
89
{
Joints::ShoulderRight
,
"ShoulderRight"
},
90
{
Joints::ElbowRight
,
"ElbowRight"
},
91
{
Joints::WristRight
,
"WristRight"
},
92
{
Joints::HandRight
,
"HandRight"
},
93
{
Joints::HandtipRight
,
"HandtipRight"
},
94
{
Joints::ThumbRight
,
"ThumbRight"
},
95
{
Joints::HipLeft
,
"HipLeft"
},
96
{
Joints::KneeLeft
,
"KneeLeft"
},
97
{
Joints::AnkleLeft
,
"AnkleLeft"
},
98
{
Joints::FootLeft
,
"FootLeft"
},
99
{
Joints::HipRight
,
"HipRight"
},
100
{
Joints::KneeRight
,
"KneeRight"
},
101
{
Joints::AnkleRight
,
"AnkleRight"
},
102
{
Joints::FootRight
,
"FootRight"
},
103
{
Joints::Head
,
"Head"
},
104
{
Joints::Nose
,
"Nose"
},
105
{
Joints::EyeLeft
,
"EyeLeft"
},
106
{
Joints::EarLeft
,
"EarLeft"
},
107
{
Joints::EyeRight
,
"EyeRight"
},
108
{
Joints::EarRight
,
"EarRight"
}};
109
110
/**
111
* Segments (defined by pairs of joints) as defined in the body model.
112
*/
113
inline
const
std::vector<std::pair<Joints, Joints>>
Segments
{
114
{
Joints::SpineNaval
,
Joints::Pelvis
},
115
{
Joints::SpineChest
,
Joints::SpineNaval
},
116
{
Joints::Neck
,
Joints::SpineChest
},
117
{
Joints::ClavicleLeft
,
Joints::SpineChest
},
118
{
Joints::ShoulderLeft
,
Joints::ClavicleLeft
},
119
{
Joints::ElbowLeft
,
Joints::ShoulderLeft
},
120
{
Joints::WristLeft
,
Joints::ElbowLeft
},
121
{
Joints::HandLeft
,
Joints::WristLeft
},
122
{
Joints::HandtipLeft
,
Joints::HandLeft
},
123
{
Joints::ThumbLeft
,
Joints::WristLeft
},
124
{
Joints::ClavicleRight
,
Joints::SpineChest
},
125
{
Joints::ShoulderRight
,
Joints::ClavicleRight
},
126
{
Joints::ElbowRight
,
Joints::ShoulderRight
},
127
{
Joints::WristRight
,
Joints::ElbowRight
},
128
{
Joints::HandRight
,
Joints::WristRight
},
129
{
Joints::HandtipRight
,
Joints::HandRight
},
130
{
Joints::ThumbRight
,
Joints::WristRight
},
131
{
Joints::HipLeft
,
Joints::Pelvis
},
132
{
Joints::KneeLeft
,
Joints::HipLeft
},
133
{
Joints::AnkleLeft
,
Joints::KneeLeft
},
134
{
Joints::FootLeft
,
Joints::AnkleLeft
},
135
{
Joints::HipRight
,
Joints::Pelvis
},
136
{
Joints::KneeRight
,
Joints::HipRight
},
137
{
Joints::AnkleRight
,
Joints::KneeRight
},
138
{
Joints::FootRight
,
Joints::AnkleRight
},
139
{
Joints::Head
,
Joints::Neck
},
140
{
Joints::Nose
,
Joints::Head
},
141
{
Joints::EyeLeft
,
Joints::Head
},
142
{
Joints::EarLeft
,
Joints::Head
},
143
{
Joints::EyeRight
,
Joints::Head
},
144
{
Joints::EarRight
,
Joints::Head
}};
145
146
147
inline
const
std::map<Joints, simox::Color>
Colors
= {
148
{
Joints::Pelvis
, {0.f, 1.f, 0.f}},
149
{
Joints::SpineNaval
, {0.f, 1.f, 0.f}},
150
{
Joints::SpineChest
, {1.f, 0.f, 85.f / 255.f}},
151
{
Joints::Neck
, {1.f, 0.f, 85.f / 255.f}},
152
{
Joints::ClavicleLeft
, {1.f, 1.f, 0.f}},
153
{
Joints::ShoulderLeft
, {1.f, 1.f, 0.f}},
154
{
Joints::ElbowLeft
, {170.f / 255.f, 1.f, 0.f}},
155
{
Joints::WristLeft
, {85.f / 255.f, 1.f, 0.f}},
156
{
Joints::HandLeft
, {1.f, 0.f, 0.f}},
157
{
Joints::HandtipLeft
, {0.f, 1.f, 0.f}},
158
{
Joints::ThumbLeft
, {0.f, 0.f, 1.f}},
159
{
Joints::ClavicleRight
, {1.f, 0.f, 0.f}},
160
{
Joints::ShoulderRight
, {1.f, 0.f, 0.f}},
161
{
Joints::ElbowRight
, {1.f, 85.f / 255.f, 0.f}},
162
{
Joints::WristRight
, {1.f, 170.f / 255.f, 0.f}},
163
{
Joints::HandRight
, {1.f, 0.f, 0.f}},
164
{
Joints::HandtipRight
, {0.f, 1.f, 0.f}},
165
{
Joints::ThumbRight
, {0.f, 0.f, 1.f}},
166
{
Joints::HipLeft
, {0.f, 1.f, 1.f}},
167
{
Joints::KneeLeft
, {0.f, 170.f / 255.f, 1.f}},
168
{
Joints::AnkleLeft
, {0.f, 85.f / 255.f, 1.f}},
169
{
Joints::FootLeft
, {85.f / 255.f, 0.f, 1.f}},
170
{
Joints::HipRight
, {1.f, 0.f, 0.f}},
171
{
Joints::KneeRight
, {0.f, 1.f, 85.f / 255.f}},
172
{
Joints::AnkleRight
, {0.f, 1.f, 170.f / 255.f}},
173
{
Joints::FootRight
, {0.f, 0.f, 1.f}},
174
{
Joints::Head
, {1.f, 0.f, 85.f / 255.f}},
175
{
Joints::Nose
, {1.f, 0.f, 85.f / 255.f}},
176
{
Joints::EyeLeft
, {1.f, 0.f, 170.f / 255.f}},
177
{
Joints::EarLeft
, {1.f, 0.f, 1.f}},
178
{
Joints::EyeRight
, {0.f, 0.f, 1.f}},
179
{
Joints::EarRight
, {170.f / 255.f, 0.f, 1.f}}};
180
181
}
// namespace armarx::human::pose::model::k4a_bt_body_32
armarx::human::pose::model::k4a_bt_body_32
This file is part of ArmarX.
Definition
k4a_bt_body_32.h:32
armarx::human::pose::model::k4a_bt_body_32::ModelId
const std::string ModelId
Definition
k4a_bt_body_32.h:33
armarx::human::pose::model::k4a_bt_body_32::Colors
const std::map< Joints, simox::Color > Colors
Definition
k4a_bt_body_32.h:147
armarx::human::pose::model::k4a_bt_body_32::JointNames
const simox::meta::EnumNames< Joints > JointNames
Names of the joints as defined in the body model.
Definition
k4a_bt_body_32.h:77
armarx::human::pose::model::k4a_bt_body_32::Segments
const std::vector< std::pair< Joints, Joints > > Segments
Segments (defined by pairs of joints) as defined in the body model.
Definition
k4a_bt_body_32.h:113
armarx::human::pose::model::k4a_bt_body_32::Joints
Joints
Joints with index as defined in the body model.
Definition
k4a_bt_body_32.h:39
armarx::human::pose::model::k4a_bt_body_32::Joints::ElbowRight
@ ElbowRight
Definition
k4a_bt_body_32.h:53
armarx::human::pose::model::k4a_bt_body_32::Joints::Nose
@ Nose
Definition
k4a_bt_body_32.h:67
armarx::human::pose::model::k4a_bt_body_32::Joints::EyeRight
@ EyeRight
Definition
k4a_bt_body_32.h:70
armarx::human::pose::model::k4a_bt_body_32::Joints::HandLeft
@ HandLeft
Definition
k4a_bt_body_32.h:48
armarx::human::pose::model::k4a_bt_body_32::Joints::WristLeft
@ WristLeft
Definition
k4a_bt_body_32.h:47
armarx::human::pose::model::k4a_bt_body_32::Joints::ClavicleLeft
@ ClavicleLeft
Definition
k4a_bt_body_32.h:44
armarx::human::pose::model::k4a_bt_body_32::Joints::EyeLeft
@ EyeLeft
Definition
k4a_bt_body_32.h:68
armarx::human::pose::model::k4a_bt_body_32::Joints::ElbowLeft
@ ElbowLeft
Definition
k4a_bt_body_32.h:46
armarx::human::pose::model::k4a_bt_body_32::Joints::ClavicleRight
@ ClavicleRight
Definition
k4a_bt_body_32.h:51
armarx::human::pose::model::k4a_bt_body_32::Joints::KneeRight
@ KneeRight
Definition
k4a_bt_body_32.h:63
armarx::human::pose::model::k4a_bt_body_32::Joints::KneeLeft
@ KneeLeft
Definition
k4a_bt_body_32.h:59
armarx::human::pose::model::k4a_bt_body_32::Joints::Neck
@ Neck
Definition
k4a_bt_body_32.h:43
armarx::human::pose::model::k4a_bt_body_32::Joints::ShoulderLeft
@ ShoulderLeft
Definition
k4a_bt_body_32.h:45
armarx::human::pose::model::k4a_bt_body_32::Joints::AnkleRight
@ AnkleRight
Definition
k4a_bt_body_32.h:64
armarx::human::pose::model::k4a_bt_body_32::Joints::Head
@ Head
Definition
k4a_bt_body_32.h:66
armarx::human::pose::model::k4a_bt_body_32::Joints::WristRight
@ WristRight
Definition
k4a_bt_body_32.h:54
armarx::human::pose::model::k4a_bt_body_32::Joints::ShoulderRight
@ ShoulderRight
Definition
k4a_bt_body_32.h:52
armarx::human::pose::model::k4a_bt_body_32::Joints::ThumbLeft
@ ThumbLeft
Definition
k4a_bt_body_32.h:50
armarx::human::pose::model::k4a_bt_body_32::Joints::HandtipRight
@ HandtipRight
Definition
k4a_bt_body_32.h:56
armarx::human::pose::model::k4a_bt_body_32::Joints::HandtipLeft
@ HandtipLeft
Definition
k4a_bt_body_32.h:49
armarx::human::pose::model::k4a_bt_body_32::Joints::EarLeft
@ EarLeft
Definition
k4a_bt_body_32.h:69
armarx::human::pose::model::k4a_bt_body_32::Joints::FootLeft
@ FootLeft
Definition
k4a_bt_body_32.h:61
armarx::human::pose::model::k4a_bt_body_32::Joints::FootRight
@ FootRight
Definition
k4a_bt_body_32.h:65
armarx::human::pose::model::k4a_bt_body_32::Joints::HipRight
@ HipRight
Definition
k4a_bt_body_32.h:62
armarx::human::pose::model::k4a_bt_body_32::Joints::Pelvis
@ Pelvis
Definition
k4a_bt_body_32.h:40
armarx::human::pose::model::k4a_bt_body_32::Joints::HandRight
@ HandRight
Definition
k4a_bt_body_32.h:55
armarx::human::pose::model::k4a_bt_body_32::Joints::SpineNaval
@ SpineNaval
Definition
k4a_bt_body_32.h:41
armarx::human::pose::model::k4a_bt_body_32::Joints::HipLeft
@ HipLeft
Definition
k4a_bt_body_32.h:58
armarx::human::pose::model::k4a_bt_body_32::Joints::ThumbRight
@ ThumbRight
Definition
k4a_bt_body_32.h:57
armarx::human::pose::model::k4a_bt_body_32::Joints::EarRight
@ EarRight
Definition
k4a_bt_body_32.h:71
armarx::human::pose::model::k4a_bt_body_32::Joints::AnkleLeft
@ AnkleLeft
Definition
k4a_bt_body_32.h:60
armarx::human::pose::model::k4a_bt_body_32::Joints::SpineChest
@ SpineChest
Definition
k4a_bt_body_32.h:42
VisionX
libraries
human
pose
model
k4a_bt_body_32.h
Generated by
1.13.2