Add pose landmarks constants

PiperOrigin-RevId: 559153433
This commit is contained in:
MediaPipe Team 2023-08-22 10:29:37 -07:00 committed by Copybara-Service
parent 7517b56476
commit bcb83302bf
3 changed files with 76 additions and 3 deletions

View File

@ -160,3 +160,8 @@ cc_library(
name = "pose_landmarks_connections", name = "pose_landmarks_connections",
hdrs = ["pose_landmarks_connections.h"], hdrs = ["pose_landmarks_connections.h"],
) )
cc_library(
name = "pose_landmark",
hdrs = ["pose_landmark.h"],
)

View File

@ -0,0 +1,68 @@
/* Copyright 2023 The MediaPipe Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARK_H_
#define MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARK_H_
namespace mediapipe {
namespace tasks {
namespace vision {
namespace pose_landmarker {
static constexpr int kNumPoseLandmarks = 33;
// BlazePose 33 landmark names.
enum class PoseLandmark {
kNose = 0,
kLeftEyeInner,
kLeftEye,
kLeftEyeOuter,
kRightEyeInner,
kRightEye,
kRightEyeOuter,
kLeftEar,
kRightEar,
kMouthLeft,
kMouthRight,
kLeftShoulder,
kRightShoulder,
kLeftElbow,
kRightElbow,
kLeftWrist,
kRightWrist,
kLeftPinky1,
kRightPinky1,
kLeftIndex1,
kRightIndex1,
kLeftThumb2,
kRightThumb2,
kLeftHip,
kRightHip,
kLeftKnee,
kRightKnee,
kLeftAnkle,
kRightAnkle,
kLeftHeel,
kRightHeel,
kLeftFootIndex,
kRightFootIndex,
};
} // namespace pose_landmarker
} // namespace vision
} // namespace tasks
} // namespace mediapipe
#endif // MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARK_H_

View File

@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef MEDIAPIPE_TASKS_CC_VISION_HAND_LANDMARKER_HAND_LANDMARKER_RESULT_H_ #ifndef MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARKER_RESULT_H_
#define MEDIAPIPE_TASKS_CC_VISION_HAND_LANDMARKER_HAND_LANDMARKER_RESULT_H_ #define MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARKER_RESULT_H_
#include <vector> #include <vector>
@ -49,4 +49,4 @@ PoseLandmarkerResult ConvertToPoseLandmarkerResult(
} // namespace tasks } // namespace tasks
} // namespace mediapipe } // namespace mediapipe
#endif // MEDIAPIPE_TASKS_CC_VISION_HAND_LANDMARKER_HAND_LANDMARKER_RESULT_H_ #endif // MEDIAPIPE_TASKS_CC_VISION_POSE_LANDMARKER_POSE_LANDMARKER_RESULT_H_