Group landmarks points together with visibility in a single structure
This commit is contained in:
parent
17d38c9c5a
commit
0c292576f9
|
@ -153,12 +153,8 @@ bool PoseTracking::processFrame(const cv_wrapper::Mat& inputRGB8Bit) {
|
|||
return mImplementation->processFrame(frame);
|
||||
}
|
||||
|
||||
cv_wrapper::Point3f* PoseTracking::lastDetectedLandmarks() {
|
||||
return mImplementation->lastDetectedLandmarks();
|
||||
}
|
||||
|
||||
float* PoseTracking::lastLandmarksVisibility() {
|
||||
return mImplementation->landmarksVisibility();
|
||||
PoseTracking::PoseLandmarks PoseTracking::lastDetectedLandmarks() {
|
||||
return {mImplementation->lastDetectedLandmarks(), mImplementation->landmarksVisibility()};
|
||||
}
|
||||
|
||||
cv_wrapper::Mat PoseTracking::lastSegmentedFrame() {
|
||||
|
@ -171,5 +167,4 @@ PoseTracking::~PoseTracking()
|
|||
{
|
||||
delete mImplementation;
|
||||
}
|
||||
|
||||
} // namespace nimagna
|
||||
|
|
|
@ -62,9 +62,16 @@ struct Mat {
|
|||
};
|
||||
} // namespace cv_wrapper
|
||||
|
||||
|
||||
class DLLEXPORT PoseTracking {
|
||||
public:
|
||||
struct PoseLandmarks {
|
||||
PoseLandmarks(cv_wrapper::Point3f* points, float* visibility) : points(points), visibility(visibility) {}
|
||||
static constexpr size_t kLandmarksCount = 33u;
|
||||
const cv_wrapper::Point3f* points;
|
||||
const float* visibility;
|
||||
};
|
||||
|
||||
enum LandmarkNames {
|
||||
NOSE = 0,
|
||||
LEFT_EYE_INNER,
|
||||
|
@ -99,7 +106,7 @@ class DLLEXPORT PoseTracking {
|
|||
RIGHT_HEEL,
|
||||
LEFT_FOOT_INDEX,
|
||||
RIGHT_FOOT_INDEX,
|
||||
COUNT = kLandmarksCount
|
||||
COUNT = PoseLandmarks::kLandmarksCount
|
||||
};
|
||||
|
||||
PoseTracking(const char* calculatorGraphConfigFile);
|
||||
|
@ -107,8 +114,7 @@ class DLLEXPORT PoseTracking {
|
|||
|
||||
bool processFrame(const cv_wrapper::Mat& inputRGB8Bit);
|
||||
cv_wrapper::Mat lastSegmentedFrame();
|
||||
cv_wrapper::Point3f* lastDetectedLandmarks();
|
||||
float* lastLandmarksVisibility();
|
||||
PoseTracking::PoseLandmarks lastDetectedLandmarks();
|
||||
|
||||
private:
|
||||
PoseTrackingImpl* mImplementation;
|
||||
|
|
Loading…
Reference in New Issue
Block a user