一、从Asset Store获取kinect包



其目录结构如下:



/**************************
今天我的任务就是把四个pdf说明文档看一遍:
**************************/

How to Use Gestures or Create Your Own Gestures

如何使用手势 | 创建你自己的手势

There are two ways to add gesture detection and gesture recognition to your Unity-project.
-此处有两种添加手势检测和在你的Unity项目中手势识别的方法

For the first one look at KinectManager – a component of MainCamera in the example scene. There are two lists - “Player1 Gestures” (these are the gestures expected from player 1) and “Player2 Gestures” (expected from player 2).
-方法一:浏览KinectManager(示例场景中MainCamera的一个组件)。上面有两个列表——“Player1 Gestures”(玩家1的手势预测)和“Player2 Gestures”(玩家2的手势预测)。

The gestures in these lists will be detected during the entire game.
-游戏运行时,列表中的这些手势会一直被检测。

The second way is to specify user specific gestures programmatically. To add such gestures or to handle any of the specified gestures (in 1. or 2. way), you need to implement KinectGestures.GestureListenerInterface. For an example look at the KinectScripts/Extras/SimpleGestureListener.cs-script. Here is a short description of its methods:
-方法二是用编程的方式指定特定的手势。为了添加手势或者标记特定手势(通过方法一或方法二)
,你需要实现KinectGestures.GestureListenerInterface这个接口。举个例子,参考KinectScripts/Extras/SimpleGestureListener.cs这个脚本。下面是对其方法的简介:

UserDetected() can be used to start gesture detection programmatically. UserLost() can be used to clear variables or to free the allocated resources. You don’t need to remove the gestures added by UserDetected()-method explicitly. They are removed automatically, before the invocation of UserLost().
-代码里可以用UserDetected()来开始检测手势。用UserLost()明确变量或者释放资源。通过UserDetected()方法添加的手势,你不需要显示地移除。它们会在调用UserLost()之前被自动移除。

GestureInProgress()-method is invoked when a gesture is started, but not yet completed or cancelled. GestureCompleted() is invoked when the gesture is completed. You can add your own code there to handle the completed gestures. GestureCancelled() is invoked, if the gesture is cancelled.
-当有手势开始时,调用GestureInProgress()方法,此时手势还没完成或者被取消。手势完成时调用GestureCompleted()。你可以在这个方法里添加手势完成时的指令。手势被取消时,调用GestureCancelled()。


Currently Recognized Gestures

-当前识别的手势

The following gestures are currently recognized:
-目前能识别以下手势:

  • RaiseRightHand / RaiseLeftHand – left or right hand is raised over the shoulder and stays so for at least 1.0 second. 举左手 /举右手 ——左 / 右手举过肩保持1.0s以上
  • Psi – both hands are raised over the shoulder and the user stays in this pose for 1.0 seconds. Psi(这个暂时不知道翻译成啥,目前翻译成Ψ,动作象形)——双手举过肩,保持这个姿势1.0s以上
  • Tpose – the hands are to the sides, perpendicular to the body (T-pose), for 1.0 seconds. T型动作——双手两侧平举,与身体垂直(T-型),1.0s。
  • Stop – right hand is down and left hand is slightly to the side, but below the waist, or left hand is down and right hand is slightly to the side, but below the waist. 停——右手向下,左手稍偏,但是要在腰部以下(或者互换,同样)。
  • Wave – right hand is waved left and then back right, or left hand is waved right and then back left. 挥手——右手朝左挥动然后回到右侧(左手亦然)。
  • SwipeLeft – right hand swipes left.左滑——右手向左滑动。
  • SwipeRight – left hand swipes right.右滑——左手向右滑动
  • SwipeUp / SwipeDown – swipe up or down with left or right hand下滑 / 上滑——左手或右手滑上或者滑下
  • Click – left or right hand stays in place for at least 2.5s. Useful in combination with cursor control.点击——左/右手在一个地方保持至少2.5s。结合光标控制非常有用。
  • RightHandCursor / LeftHandCursor – pseudo gesture, used to provide cursor movement with the right or left hand. 右手光标 / 左手光标——模拟手势,提供左/右手的移动光标
  • ZoomOut – left and right hands are to the front and put together at the beginning, then the hands move in different directions.放大——左右手朝前,一开始时放在一起,然后双手朝不同方向移动
  • ZoomIn - left and right hands are at least 0.7 meter apart and to the front at the beginning, then the hands get closer to each other.缩小——左右手朝前,至少相隔0.7m,然后相互靠近。
  • Wheel - left and right hands are shoulder size apart and to the front at the beginning, then the hands start to turn an imaginary wheel left (positive angle) or right (negative angle). 旋转——左右手朝前,一肩之距,然后双手开始绕假想轮盘转动。左转为正角,右转为负角。
  • Jump – the hip center gets at least 15cm above its last position within 1.5 seconds.跳——骨骼中心点在1.5s之内比原位置高15cm以上
  • Squat - the hip center gets at least 15cm below its last position within 1.5 seconds蹲——骨骼中心点在1.5s之内比原位置低15cm以上
  • Push – push forward with left or right hand within 1.5 seconds推——1.5s之内,左手或右手向前推
  • Pull - pull backward with left or right hand within 1.5 seconds拉——1.5s之内,左手或右手往后拉

How to Add Your Own Gestures

-如何添加你自己的手势


Here are some hints on how to add your own gestures to the Kinect gesture-detection procedure. You need some C# coding skills and a bit of basic understanding on how the sensor works. It reports the 3d-coordnates of the tracked body parts in the Kinect coordinate system, in meters.
-关于怎样在kinect手势检测程序中添加你自己的手势,此处有一些建议。你需要有一些C#编码技能以及传感器工作原理的一点基础理解。kinect坐标系统以米为单位,反馈追踪到的人体四肢的3D坐标。

To add detection of custom gesture, open Assets/KinectScripts/KinectGestures.cs. Then:
-添加自定义手势的检测,需要先打开Assets/KinectScripts/KinectGestures.cs脚本,然后:

  1. Find the Gestures-enum. First you need to add the name of your gesture at the end of this enum.
    -找到Gestures枚举。你第一步需要在这个枚举的后面添加你的手势名。
  2. Find the CheckForGesture()-function. There is a long switch() there, and its cases process the detection of each gesture, defined in the Gestures-enum. You need to add a case for your gesture at the end of this switch(), near the end of the script. There you will implement the gesture detection.
    -找到CheckForGesture()方法。这里面有一个比较长的switch()表达式,它的case处理每个在Gestures枚举中定义的手势的检测。你需要在这个脚本底部的switch()尾部为你的手势添加一个case。这里你将实行手势检测。
  3. For an example on how to do that, look at the processing of some simple gestures, like RaiseLeftHand, RaiseRightHand, SwipeLeft or SwipeRight.
    -想找怎样实现的例子,可以参照比如RaiseLeftHand, RaiseRightHand, SwipeLeft or SwipeRight这些处理一些简单手势的样本。
  4. As you see, each gesture has its own internal switch() to check and change the gesture’s current state. Each gesture is like a state machine with numerical states (0, 1, 2, 3…). Its current state along with other data, is stored in an internal structure of type GestureData. This data-structure is created for each gesture that needs to be detected in the scene.
    -如你所见,每个手势都有与自己相关的switch()来检查和改变手势的当前状态。每个手势就像一个数值状态机*(0,1,2,3…)。当前的状态伴随着其他被存储在相关联的结构体或者手势数据存储器中。这个数据结构为每个在场景中需要被检测的手势而创建。
  5. The initial state of each gesture is 0. At this state, the code needs to detect if the gesture is starting or not. To do this, it checks and stores the position of a joint, usually the left or right hand. If the joint position is suitable for a gesture start, it increments the state. At the next state, it checks if the joint has reached the needed position (or distance from the previous position), usually within a time interval, let’s say within 1.0 - 1.5 seconds.
    -每个手势的初始状态是0。这个状态下,指令需要检测手势是否正要开始。为了做到这样,指令需要检测和储存相关的位置,通常是左手和右手。假如相关位置适合手势开始,它就增加这个状态。在下一个状态,它会检测相关的关节是否到达了所需位置(或者是从上一个位置的距离),一般是在一个时间间隔之内,通常为1.0-1.5s。
  6. If the joint has reached its target position (or distance) within the time interval, the gesture is considered completed. Otherwise - it is considered cancelled. Then, the gesture state may be reset back to 0 and the gesture-detection procedure will start again.
    -假如关节在时间间隔内到达了目标位置(或者距离),手势就被认为完成。或者——被认为取消。那么,手势状态可能重设回0,手势检测又会再一次进行。

    To add detection of your own gestures, first try to understand how relatively simple gestures, like RaiseHand or Swipes, work. Then find a gesture similar to the one you need. Copy and modify its code to fit your needs. Hope this helps for a start ;)
    -想要添加你自己的手势检测,首先尝试理解相关的简单手势,例如举手或者滑动的检测原理。然后找到一个与你的需求相似的手势。复制和修改里面的代码来适应你的需求。希望这篇文章能有助于入门。

Support, Examples and Feedback
-支持,案例和反馈

E-mail: rumen.filkov@gmail.com;

Web: http://rfilkov.com

Skype: roumenf

Twitter: roumenf

Kinect第一天:翻译相关推荐

  1. 【六级翻译】2017年12月第一套翻译

    这是2017年12月份翻译的第一套试题,这一次的考试主要是针对中国的山河湖泊进行翻译,在翻译过程中难点主要是: 1.淡水湖:freshwater lake 2.仅此与:be just after 3. ...

  2. Solr in Action 第一章翻译(待整理)

    Solr in action读书笔记第一篇第一章   第1章 Solr简介 本章速览: ·搜索引擎处理的数据特性  ·常见搜索引擎用例  ·Solr核心模块介绍  ·选择Solr的理由  ·功能概述 ...

  3. mondrian in action 第一章翻译 (主要用百度翻译完成,稍加整理)

    本章涵盖 基于数据库的报告的复杂性a OLAP报告工具的优势 用蒙德里安的原因 业务分析是一个基于历史数据分析来深入了解业务绩效的过程.传统上,用于业务分析的工具非常昂贵,难以维护.相比之下,蒙德里安 ...

  4. 《Spring Security3》第四章第一部分翻译下(自定义的UserDetailsServic

    2019独角兽企业重金招聘Python工程师标准>>> 创建一个自定义的JDBC UserDetailsService 在com.packtpub.springsecurity.se ...

  5. 《静态时序分析实用方法》 第一章翻译

    第1章 引言 解释了什么是静态时序分析以及它如何用于时序验证.还描述了功率和可靠性方面的考虑. 概述了纳米设计的静态时序分析程序.本章解决了诸如什么是静态时序分析.噪声和串扰的影响是什么.如何使用这些 ...

  6. 2019年6月六级第一套翻译解析

    中国幅员辽阔,人空众多,很多地方人们都说自己的方言. China is a vast country with a large population. People in many places sp ...

  7. 关于对《Spring Security3》翻译 (第一章 - 第三章)

    原文:http://lengyun3566.iteye.com/category/153689?page=2 翻译说明 最近阅读了<Spring Security3>一书,颇有收获(封面见 ...

  8. 【转】关于HTTP中文翻译的讨论

    http://www.ituring.com.cn/article/1817 讨论参与者共16位: 图灵谢工 杨博 陈睿杰 贾洪峰 李锟 丁雪丰 郭义 梁涛 吴玺喆 邓聪 胡金埔 臧秀涛 张伸 图钉派 ...

  9. 函数式编程里的Materialization应该翻译成什么?

    Materialization是函数式编程里的一个专业术语, 用于特指函数式编程中查询被实际执行并生成结果的这一过程. 首先, 搜了一下中文资料, 暂时没有对该词的中文翻译,  CSDN\博客园\阿里 ...

最新文章

  1. MyBatis原理分析之四:一次SQL查询的源码分析
  2. [转]C# winForm 自定义鼠标样式的两种方法
  3. docker-compose部署nginx,挂载外置配置文件及项目
  4. go http 处理w.write 错误_go学习笔记-错误处理
  5. 缓存-分布式锁-Redisson简介整合
  6. CAS(比较并交换)学习CAS实现原子性+volatile实现可见性,cas与synchronized比较的优缺点
  7. 如何阅读一本书~阅读的层次
  8. conda deactivate python3_conda进行python环境隔离
  9. 最全中文leetcode解题攻略:思路知识点代码都有,搞定AI大厂笔试
  10. linux下无mysql命令_linux下mysql命令
  11. Oralce 导入dpm 文件数据
  12. javaScript位移密码算法挑战
  13. 腾讯历届笔试题(1)
  14. 计算机想ping一下网络,电脑的Ping值和网络带宽之间有什么关系?
  15. Basic Block
  16. 《Mysql数据库》
  17. 微信小程序ios版本连接不了服务器,微信小程序苹果手机IOS连接报网络错误解决方案...
  18. strace命令解析
  19. 04-dropbear
  20. 商圈分析如何大数据软件采集相关要素

热门文章

  1. 用OpenLayers解析GML文件
  2. 5-pytorch安装
  3. python统计各省大学数_全国各省大学综合信息数据(教师.人口.本科.GDP.本科占人口比例)统计...
  4. 【书影观后感 十】理解原则从《我的历程》看到的
  5. 关于NOIP—信息学奥赛,多的是你不知道的事!
  6. 【实战与杂谈】本地搭建自己的游戏王卡片生成器
  7. go的string正则匹配_基础知识 - Golang 中的正则表达式
  8. 小白电脑入门:初级系列1--计算机
  9. html中使用VUE时IE不兼容,vue2.x遇到ie11不兼容的坑
  10. opencv-双边滤波bilateralFilter()