2024-06-11 14:50:10 发布
网友
我是Leap Motion的新手,正在使用Python中的示例代码(也是Python的新手)。我试着得到一些关于左右手和手指的信息(俯仰,滚动,偏航…等等)。重要的是我知道哪一个是左边,哪个是右边。我可以用手部框架但我不知道哪只手是哪只。例如是手部框架[0]总是左手,最左边的手,还是任意的?我也很困惑为什么它有时会认为有两个以上的手。是手部框架[0]一帧接一帧的同一只手?如果没有,有没有一个好的方法来跟踪一只手?在
您可以查看leap motion 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"
我不认为HandList中的索引顺序有任何保证,尽管您可以使用例如rightmost到{a1}:
HandList
rightmost
hands = frame.hands rightmost = hands.rightmost
但是,要逐字复制他们的注释:
Note that the the leftmost() and rightmost() functions only identify which hand is farthest to the left or right. The functions do not identify which hand is the right or left hand.
leftmost()
rightmost()
如果要在帧之间跟踪手,可以使用它的Hand.id;请参见the documentation:
Hand.id
您可以查看leap motion api参考:https://developer.leapmotion.com/documentation/python/api/Leap.Hand.html?proglang=python#Leap.Hand.is_left
正如您在本页中看到的,有这样的布尔值表示手是右手还是左手:
我不认为
HandList
中的索引顺序有任何保证,尽管您可以使用例如rightmost
到{a1}:但是,要逐字复制他们的注释:
如果要在帧之间跟踪手,可以使用它的
^{pr2}$Hand.id
;请参见the documentation:相关问题 更多 >
编程相关推荐