我是 Leap Motion 的新手,正在使用 Python 中的示例代码(也是 Python 的新手)。我正在尝试获取有关左右手和手指的一些信息(俯仰、滚动、偏航等)。重要的是我知道哪个是左哪个是右。我可以使用 frame.hands 提取手信息,但我不知道哪只手是哪只手。例如 frame.hands[0] 总是左手,最左手,还是任意的?我也很困惑为什么它有时认为有超过 2 手牌。frame.hands[0] 从一帧到另一帧是同一只手吗?如果没有,有没有很好的方法来追踪手牌?
问问题
943 次
2 回答
1
您可以查看跳跃运动 api 参考:https ://developer.leapmotion.com/documentation/python/api/Leap.Hand.html?proglang=python#Leap.Hand.is_left
正如您在此页面上看到的那样,有这样的布尔值来指示手是右手还是左手:
if hand.is_right:
# .. Do right handed stuff
hand_name = "Left hand" if hand.is_left else "Right hand"
于 2015-08-18T10:30:12.237 回答