【Mediapipe】windows C++ 修改hand_tracking可视化部分

本文介绍了如何在Windows环境下使用C++编译Mediapipe时,修改hand_tracking子图以仅保留handness landmark。通过注释掉mediapipemediapipegraphshand_trackingsubgraphshand_renderer_cpu.pbtxt文件中的特定部分并重新编译,可以实现所需效果。此外,还汇总了Mediapipe handtracking中landmarks的XYZ坐标含义,解释了归一化的坐标系统。
摘要由CSDN通过智能技术生成

如果直接运行官方给的demo,windows C++多出了许多我不想要的框
想要只留下 handness landmark

修改:
mediapipe\mediapipe\graphs\hand_tracking\subgraphshand_renderer_cpu.pbtxt
将红框部分注释掉 ,重新编译即可
在这里插入图片描述
效果如下:
在这里插入图片描述
ps:关于mediapipe handtracking中的一些issue汇总:

landmarks 输出的XYZ坐标代表什么?

Normalized X gives 0 to 1 where x-origin is origin of the image x-coordinate
Normalized Y gives 0 to 1 where y-origin is origin of the image y-coordinate
Normalized Z where z-origin is relative to the wrist z-origin. I.e if Z is positive, the z-la ndmark coordinate is out of the page with respect to the wrist. Z is negative, the z-landmark coordinate is into the page with respect of the wrist.
X是归一化之后的X轴像素坐标
Y是归一化之后的Y轴像素坐标
Z是归一化之后的相对于手腕的值。也就说是一手腕坐标为原点,如果Z是正的,则Z坐标相对于手腕更远离相机设备。Z是负的,关节相对于手腕更接近相机设备。

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值