LeapMotion 简介
Leap Motion Overview
Leap Motion是一种检测和跟踪hands, fingers and finger-like tools的设备。该设备在一个较近的环境中操作,精度高,跟踪帧速率高。
Leap Motion 视野是集中在设备上方的一个倒置的金字塔。Leap Motion检测的有效范围是约25毫米至600毫米(1英寸到2英尺)。
Leap Motion能够有效分析它视野中观察到的对象。它能够区分的hands, fingers and tools; 提供一系列动作和位置等信息; 它可以识别出四种特定的动作: Circle,Swipe,Key Taps,Screen Taps; 通过持续跟踪动作流,Leap Motion还可以将一个区域内的动作理解为三种基本元素:scaling, translation, and rotation。
Coordinate system
Leap Motion系统采用右手直角坐标系,所检测的值在现实世界毫米为单位。原点为 Leap Motion 控制器的中心。x轴和z轴位于在水平面,与x轴平行的长边的装置,y轴是垂直的,具有正值且向上增加(对比向下取向的计算机图形学的坐标系)。 z轴正值越来越远离电脑屏幕。
The Leap Motion right-handed coordinate system.
Motion tracking data
Leap Motion 再其视野内设备追踪hands, fingers, and tools,它提供了一系列数据集合frame的更新。每个frame都包含基本的跟踪数据,如hands, fingers, and tools,以及识别出的Gestures和整个场景中motion元素的描述 。 当它检测到a hand, finger, tool, or gesture, Leap Motion 软件为它分配一个唯一的ID指示符。只要该实体保持设备的视野内可见,其ID保持不变。如果跟踪丢失后收复, Leap Motion 软件可能会分配一个新的ID(该软件可能无法分辨现在可见的手或手指与丢失前是一样的)。
Frames
一个Frame对象提供跟踪数据,gestures,和motion的特征描述。
Lists of tracking data
- Hands — All hands.
- Pointables — All fingers and tools as Pointable objects.
- Fingers — All the fingers.
- Tools — All the tools.
- Gestures — All the gestures that started, ended, or which had an update.
Pointables, Fingers, and Tools:3个pointables lists包含frame中检测到所有pointable对象。您可以通过在hand list的中hand的对象,访问与hand相关联的pointables。请注意,如果用户的手仅部分在Leap Motion 的视野之内的情况下, Fingers and Tools可能就与hand对象无关。
如果你正在跟踪某个独立的对象,如a finger,您可以在frame中通过使用与该对象相关联的ID来查看。你还可以通过ID查看Hand, Finger, Tool, Pointable, and Gesture objects。如果它存在于当前frame,查找函数返回一个相应对象的引用。如果对象不再存在,那么返回一个特殊的无效对象。无效的对象是明确定义的,但不包含有效的跟踪数据。当你必须访问Leap Motion跟踪数据时,这项技术有助于减少NULL检查。
Frame motion
Leap Motion 软件分析之前frame发生的整体运动来合成 translation, rotation, and scaling。例如,如果在Leap Motion视野中,你将双手向左侧移动,表示translation; 如果你扭动你的手,像转动一个球,代表rotation; 如果将你的双手靠近或远离,代表scaling。Leap Motion软件在分析运动时,会使用视野内的对象。如果只检测一只手,Leap Motion检测的所有frame motion factors都基于那只手的运动。如果它检测到两只手,然后 Leap Motion软件分析双手的frame motion factors。您还可以从每只手对象得到独立 frame motion factors 。
frame motion是通过比较当前frame与先前指定的frame的运动而派生。合成motion的属性描述包括:
- Rotation Axis — A direction vector expressing the axis of rotation.
- Rotation Angle — The angle of rotation clockwise around the rotation axis (using the right-hand rule).
- Rotation Matrix — A transform matrix expressing the rotation.
- Scale Factor — A factor expressing expansion or contraction.
- Translation — A vector expressing the linear movement.
您可以通过 motion factors来操纵在你的应用程序场景中的对象,而不必在多个frame跟踪单独的手和手指对象。
Frame motion框架包含了在frame中对motion为某一种特定类型运动的估计。例如,如果Scale概率是最高的,那么你可以忽略在frame中的任何rotations or translations (如果它对于你的应用程序是合理的)。使用概率估计过滤不必要的motions可以使应用程序更易于使用。
Hand model
Hand model提供与手相关的信息包括:位置,特性,和检测到的以及与手的相关联的 fingers and tools lists。
Leap Motion API提供关于一只手尽可能多的信息。然而, Leap Motion 软件可能无法确定所有的手在每一帧中的属性。例如,当一只手攥成一个拳头,手指是不可见的,所以 Leap Motion的手指列表将是空的。当模型不提供某一个属性,你的代码应该处理这种情况。
Leap Motion 软件并不能确定是否有手是左手或右手。如果视野中出现不止一个人的手或其他手状物体,则可以出现在两个以上的手列表。不过,我们建议在Leap Motion视野中最多两只手,以保持最佳的运动跟踪质量。
Hand attributes
hand object提供被检测手的几个属性:
- Palm Position — The center of the palm measured in millimeters from the Leap Motion origin.
- Palm Velocity — The speed of the palm in millimeters per second.
- Palm Normal — A vector perpendicular to the plane formed by the palm of the hand. The vector points downward out of the palm.
- Direction — A vector pointing from the center of the palm toward the fingers.
- Sphere Center — The center of a sphere fit to the curvature of the hand (as if it were holding a ball).
- Sphere Radius — The radius of a sphere fit to the curvature of the hand. The radius changes with the shape of the hand.
The direction and palmNormal是描述手方向的单位向量符合Leap Motion坐标系
The normal vector points perpendicularly out of the hand; the direction vector points forward.(与法线垂直的方向向量指向前方)
The sphereCenter and sphereRadius 描述一个适应人手曲率的球的尺寸。
The size of the sphere decreases as the fingers are curled.(球的尺寸随着手的卷曲而变化)
Hand motion
Hand Object还提供了几个属性,报告检测手在帧之间的运动。 Leap Motion 软件分析hand的运动,以及与其相关联的手指和工具,得出平移,旋转,和缩放。移动你的手产生平移。转动,扭曲,倾斜你的手产生旋转。彼此朝向或远离移动的手指或工具产生缩放。
Hand motions来自在当前帧中的手的特性与先前指定的帧的比较。合成的motion的属性描述包括:
- Rotation Axis — A direction vector expressing the axis of rotation.
- Rotation Angle — The angle of rotation clockwise around the rotation axis (using the right-hand rule).
- Rotation Matrix — A transform matrix expressing the rotation.
- Scale Factor — A factor expressing expansion or contraction.
- Translation — A vector expressing the linear movement.
Hand Object包括对motion估计为一个特定类型的运动的估计。例如,如果Scale概率是最高的,那么你可以忽略在帧中的任何旋转或平移(如果它对于你的应用程序是合理的)。使用概率估计过滤不必要的motions可以使应用程序更易于使用。
Finger and Tool lists
你可以访问与手相关的手指和工具,用以下的三个列表:
- Pointables — Both fingers and tools as Pointable objects.
- Fingers — Just the fingers.
- Tools — Just the tools.
您还可以通过在前一frame中获得的ID值找到一个单独的 finger or tool。使用 Hand::finger(),Hand::tool(),如果你不需要区分fingers and tools ,可以使用 Hand::pointable()函数。这些函数如果在当前frame中存在,则它返回一个相应对象的引用。如果 fingers and tools 与hand object 在该frame中是不相关的,则返回一个无效的对象。
Finger and Tool models
Leap Motion设备检测和跟踪在其视野中的fingers and tools 。 Leap Motion软件根据形状区分手指状的物体。tool是更长,更薄,比手指直。 在 Leap Motion model, fingers and tools 的物理特性被抽象成 a Pointable object 。 Fingers and tools 都是pointable类型对象。pointable对象的物理特性包括:
- Length — The length of the visible portion of the object (from where it extends out of the hand to the tip).
- Width — The average width of the visible portion of the object.
- Direction — A unit direction vector pointing in the same direction as the object (i.e. from base to tip).
- Tip Position — The position of the tip in millimeters from the Leap Motion origin.
- Tip Velocity — The speed of the tip in millimeters per second.
Finger tipPosition and direction vectors provide the positions of the finger tips and the directions in which the fingers are pointing.( tipPosition and direction vectors 向量将提供指尖的位置和手指的方向)
Leap Motion 软件将一个检测到的pointable object区分为 a finger 或 a tool 。使用Pointable:: isTool()函数来确定a Pointable object代表哪一类 。
A tool is longer, thinner, and straighter than a finger.(tool比 finger是更长,更薄,更直。)
Gestures
The Leap Motion软件识别某些特定的运动模式,表明一个用户意图或命令的手势。 The Leap Motion 软件在frame将识别出的运动模式呈现为Gestures,以fingers and hands同样的方式,报告和其他动作的跟踪数据。对于观察到的每个 gestures, The Leap Motion software 为frame增加了一个Gesture object。你可以从gestures list得到这些 Gesture objects 。
以下是 The Leap Motion识别的的运动模式:
- Circle — A single finger tracing a circle.
- Swipe — A linear movement of the hand.
- Key Tap — A tapping movement by a finger as if tapping a keyboard key.
- Screen Tap — A tapping movement by the finger as if tapping a vertical computer screen.
当 Leap Motion software 软件首先分类出一种gesture,它为frame增加了一个 Gesture object。如果gesture持续, Leap Motion 添加更新后的 Gesture objects到后续frame。 The gestures Circle and Swipe 动作是连续的。 Leap Motion software 更新gesture 每一帧的状态。tap是离散的手势。 Leap Motion software 呈现单独Gesture object的每个tap。
Important: 在你应用中使用gestures之前,必须能够先识别 gestures, Controller class拥有an enableGesture() method ,使你可以使用识别你使用的 gestures.
Circle
The Leap Motion software将a finger在空间中的圆形运动轨迹识别为a Circle gesture.
A circle gesture with the forefinger.
你可以通过finger or tool来实现一个circle. Circle gestures是连续的。一旦这个gesture开始,the Leap Motion software将会持续更新这个过程,直到gesture结束。当画圆的finger or tool离开圆或运动过慢时,a circle gesture结束。
可以通过API中的 CircleGesture来查看更多信息。
Swipe
The Leap Motion software将a finger的线性移动识别为a Swipe gesture.
A horizontal swipe gesture.
你可以通过任何finger在任何方向来实现a swipe gesture. Swipe gestures是连续的。一旦这个gesture开始,the Leap Motion software将会持续更新这个过程,直到gesture结束。当finger or tool改变运动方向或运动过慢时,a swipe gesture结束。
可以通过API中的SwipeGesture来查看更多信息。
Taps
The Leap Motion software能够识别两种taps: 向下的 Key Tap 以及向前的Screen Tap.
Key Taps
The Leap Motion software将a finger or tool 一个向下的快速运动识别为a Key Tap gesture.
A key tap gesture with the forefinger.
你可以通过像弹钢琴键一样通过向下运动来实现a key tap gesture. Tap gestures是离散的。每个tap gesture都被添加到一个单独对象中。
可以通过API中的 KeyTapGesture来查看更多信息。
Screen Taps
The Leap Motion software将a finger or tool一个快速向前的运动识别为a Screen Tap gesture.
A screen tap gesture with the forefinger.
你可以通过像点击虚拟和按压触屏一样,通过向前运动来实现a screen tap gesture. Tap gestures是离散的。每个tap gesture都被添加到一个单独对象中。
可以通过API中的ScreenTapGesture来查看更多信息。
LeapMotion 简介的更多相关文章
- LeapMotion控制器 java语言开发笔记--(LeapMotion控制器简介)
(1)LeapMotion系统识别和追踪手,手指,以及根手指类似的工具,这个设备运行在一个极小的范围,这个范围拥有个高精度,高跟踪频率可以记录离散的点,手势,和动作. (2)LeapMotion控制器 ...
- ASP.NET Core 1.1 简介
ASP.NET Core 1.1 于2016年11月16日发布.这个版本包括许多伟大的新功能以及许多错误修复和一般的增强.这个版本包含了多个新的中间件组件.针对Windows的WebListener服 ...
- MVVM模式和在WPF中的实现(一)MVVM模式简介
MVVM模式解析和在WPF中的实现(一) MVVM模式简介 系列目录: MVVM模式解析和在WPF中的实现(一)MVVM模式简介 MVVM模式解析和在WPF中的实现(二)数据绑定 MVVM模式解析和在 ...
- Cassandra简介
在前面的一篇文章<图形数据库Neo4J简介>中,我们介绍了一种非常流行的图形数据库Neo4J的使用方法.而在本文中,我们将对另外一种类型的NoSQL数据库——Cassandra进行简单地介 ...
- REST简介
一说到REST,我想大家的第一反应就是“啊,就是那种前后台通信方式.”但是在要求详细讲述它所提出的各个约束,以及如何开始搭建REST服务时,却很少有人能够清晰地说出它到底是什么,需要遵守什么样的准则. ...
- Microservice架构模式简介
在2014年,Sam Newman,Martin Fowler在ThoughtWorks的一位同事,出版了一本新书<Building Microservices>.该书描述了如何按照Mic ...
- const,static,extern 简介
const,static,extern 简介 一.const与宏的区别: const简介:之前常用的字符串常量,一般是抽成宏,但是苹果不推荐我们抽成宏,推荐我们使用const常量. 执行时刻:宏是预编 ...
- HTTPS简介
一.简单总结 1.HTTPS概念总结 HTTPS 就是对HTTP进行了TLS或SSL加密. 应用层的HTTP协议通过传输层的TCP协议来传输,HTTPS 在 HTTP和 TCP中间加了一层TLS/SS ...
- 【Machine Learning】机器学习及其基础概念简介
机器学习及其基础概念简介 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...
随机推荐
- CheckBox只选择一项
最近做一个问卷的页面,客户那边说要使用checkbox而且只能选择一项 就写了下面的代码 <html xmlns="http://www.w3.org/1999/xhtml" ...
- APP应用的发展趋势
PhoneGap 是什么 PhoneGap 是一个用基于HTML,CSS 和JavaScript 的,创建移动跨平台移动应用程序的快速开发框架.它使开发者能够利用iPhone,Android,Palm ...
- VS2013无法链接到TFS (转)
VS2013无法链接到TFS(Visual studio online),错误TF31001,TF31002 TF31002: Unable to connect to VisualStudio ...
- perl正则表达式第二周笔记
1.使用正则表达式修改文本 1.使用正则表达式修改文本 正则表达式的功能不只有查询,还可以对文本进行修改,例如替换 $var=~m/regex/i $var=~s/regex/replacement/ ...
- Android 汉字转拼音之JNI篇
package com.tool.hz2py; import android.os.Bundle; import android.app.Activity; import android.view.M ...
- 十大最值得注意的MySQL变量
MySQL数据库中的变量非常多,下文为您整理出了十大最值得注意的MySQL变量,希望对您学习MySQL数据库能够有一些帮助. AD: MySQL变量很多,其中有一些MySQL变量非常值得我们注意,下面 ...
- Ztree异步树加载
JSP代码片段 <%@ page language="java" contentType="text/html; charset=utf-8" pageE ...
- linux系统性能监控常用命令
一.Linux服务器性能关注点 1)CPU -> load:表示cpu在一段时间内正在处理以及等待处理的任务之和统计信息,简单可理解为cpu正处理的线程数和能同时处理的线程数的比值.一般认为 ...
- 阿里云ECS每天一件事D9:nginx1.7整合tomcat8.0
仅通过8080端口访问jsp显然不是一算是一个太好的方法,可以使用nginx的proxy_pass子模块,实现nginx转发jsp请求至tomcat. 典型的配置如下: server { listen ...
- Qt窗口屏幕居中显示(有专门的QDesktopWidget,先计算后显示)
窗口的屏幕居中显示问题,在各开发工具中原理相同,首先使用特定的方法得到显示屏幕的宽度和高度,再根据窗口本身的宽度和高度计算出窗口的左上角坐标位置. Qt中可以采用两种方法达到窗口的屏幕居中显示: 方法 ...