LeapMotion Demo2

简介: 原文:LeapMotion Demo2    官方doc有四个手势,最近尝试实现对握拳的识别,并能在我的程序界面上体现出来。
原文: 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

目录
相关文章
|
5月前
|
JSON 负载均衡 网络协议
Rpcx (一):详解【介绍、基础示例 demo】
Rpcx (一):详解【介绍、基础示例 demo】
117 2
|
中间件 开发者
SofaBolt最简单Demo
SofaBolt最简单Demo
216 0
SofaBolt最简单Demo
|
C++
c++ demo1 比较大小
线程比大小
44 0
|
C++
c++ demo 05 类
c++ demo 05 类
75 0
|
C++
c++ demo02 类型大小
c++ demo02 类型大小
56 0
|
JavaScript 前端开发 关系型数据库
一个Demo--blog
昨天一天上班摸鱼。。。闲着没事,就写了个小的博客网站。 自己搭框架的时候发现,很多东西自己其实已经忘得差不多了,这里跟大家分享分享一些容易健忘的地方。
127 0
|
API Python
demo1
demo1
195 0
|
Web App开发 应用服务中间件 Docker
K8s-Demo实现
Kubernates的基础界面 常用的操作   将创建好的yaml文件通过Create按钮创建所需资源项目。 Dashbord:   可以通过Dashbord查看集群详情:cpu、memory、filesystemm、network等,同样也可以定制化符合自己需求的格式页面。
1892 0
|
API C# UED
LeapMotion Demo1
原文:LeapMotion Demo1     LeapMotion SDK For c# 只提供了一个Sample.cs。
1019 0