31 const std::map<std::string, std::pair<unsigned int, std::string>>
MPII_TO_MPI
33 {
"head", {0,
"Head"}},
34 {
"neck", {1,
"Neck"}},
35 {
"right_shoulder", {2,
"RShoulder"}},
36 {
"right_elbow", {3,
"RElbow"}},
37 {
"right_hand", {4,
"RWrist"}},
38 {
"left_shoulder", {5,
"LShoulder"}},
39 {
"left_elbow", {6,
"LElbow"}},
40 {
"left_hand", {7,
"LWrist"}},
41 {
"right_waist", {8,
"RHip"}},
42 {
"right_knee", {9,
"RKnee"}},
43 {
"right_foot", {10,
"RAnkle"}},
44 {
"left_waist", {11,
"LHip"}},
45 {
"left_knee", {12,
"LKnee"}},
46 {
"left_foot", {13,
"LAnkle"}},
58 return this->x - p.
x < std::numeric_limits<float>::epsilon() && this->y - p.
y < std::numeric_limits<float>::epsilon();
71 this->points = points;
81 return static_cast<int>((p1.
x - p0.
x) * (p2.
y - p0.
y)
82 - (p2.
x - p0.
x) * (p1.
y - p0.
y));
93 for (
unsigned int i = 0; i < points.size() - 1; i++)
95 if (points[i].y <= p.
y)
97 if (points[i + 1].y > p.
y)
98 if (isLeft(points[i], points[i + 1], p) > 0)
105 if (points[i + 1].y <= p.
y)
106 if (isLeft(points[i], points[i + 1], p) < 0)