首页 > 其他 > 详细

LeapMotion Demo2

时间:2018-08-14 10:11:07      阅读:225      评论:0      收藏:0      [点我收藏+]
原文:LeapMotion Demo2

? ?官方doc有四个手势,最近尝试实现对握拳的识别,并能在我的程序界面上体现出来。


? ?调试过程较为繁琐,幸好最终效果还差强人意! 首先看看我的效果图:

? ? ?技术分享图片?

?该图实时显示我握拳、松开的过程。

技术分享图片


?部分问题解决还是比较痛苦的。 ?我尝试了多种方式,但过程有时候比结果其实更重要,幸好LeapMotion的API 识别出的数据比较完善。


Tip One: 计算弯曲角度。

技术分享图片

1. measure the distance between a fingers stabilized point and the palms stabilized point
2. use that distance to calculate the angle at one end of a triangle技术分享图片

3.you can use those angles and lengths to work out lots of other lengths..


Tip Two: 根据API判断手指是否弯曲。

技术分享图片

技术分享图片

Tip Three:根据API 提供的Hand 抓取力度判断。

float?GrabStrength

The strength of a grab hand pose.

The strength is zero for an open hand, and blends to 1.0 when a grabbing hand pose is recognized.

float strength = hand.GrabStrength;
Return
A float value in the [0..1] range representing the holding strength of the pose.
Since
2.0
Tip Four:计算指尖与掌心的位置。
?----- 该方式我尝试了,也实现了我需要的效果,只是误差概率较大。也有可能是我实现过程有问题。

Tip :有一些给我提供了想法的链接:

https://stackoverflow.com/questions/26649941/detecting-a-fist-with-leap-motion-sdk-v2?

? ? ? ??https://developer-archive.leapmotion.com/gallery/finger-angle

? ? ? ? https://developer-archive.leapmotion.com/gallery/finger-angle-signed

? ? ? ? http://blog.csdn.net/qq_31411825/article/details/54773801

LeapMotion Demo2

原文:https://www.cnblogs.com/lonelyxmas/p/9472617.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!