Kinect Grip Gesture for Click

自作多情 提交于 2019-12-08 01:46:43

问题


I'm using kinect V2.0. I need to perform click using grip gesture. Is there a way to handle the Grip gesture in V2.0 like AddHandPointerGripHandler in V1.8.


回答1:


In Microsoft Kinect SDK v2.0, the Body class includes two properties:

  • Body.HandRightState
  • Body.HandLeftState

Both these properties are instances of the HandState enumeration, which specifies if the hand is:

  • Closed (and you can detect this to trigger the Grip gesture);
  • Lasso (which means that the hand is closed in a fist, except for a finger pointing upward)
  • Not Tracked (the hand state is not tracked)
  • Open (the hand is open)
  • Unknown

If you want to detect the Grip gesture, you can use a variable to save the last hand state detected, and then a "click" can be triggered every time this variable pass from an Open state to a Closed one.

Obviously, all of this can be executed every time you detect a SkeletonFrame.



来源:https://stackoverflow.com/questions/34523159/kinect-grip-gesture-for-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!