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 */
32{
33 inline const std::string ModelId = "K4ABT_BODY_32";
34
35 /**
36 * Joints with index as defined in the body model.
37 */
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 */
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
const std::map< Joints, simox::Color > Colors
const simox::meta::EnumNames< Joints > JointNames
Names of the joints as defined in the body model.
const std::vector< std::pair< Joints, Joints > > Segments
Segments (defined by pairs of joints) as defined in the body model.
Joints
Joints with index as defined in the body model.