为了毕业设计我也是拼了,六级飘过的水平也要翻译文献了,只是简单的直译,有些专业词汇可能翻译的不好,复制过来格式有点儿乱,反正也就我自己看看。。。
原文
How to Run the Kinect Demo Scenes
1.Download and install Kinect v2 SDK as described in the next section.
2.Download and import this package.
I3.f you want to utilize the included shaders instead of CPU image processing, make sure that Direct3D11 is the
first option in the ‘Graphics API’-list, in Player Settings / Other Settings / Rendering.
4.If you want to utilize the Kinect speech recognition, download and install the Speech Platform Runtime or
SDK, as well as the needed language packs, as described in the next section.
5.Open and run a demo scene of your choice:
·
·
·
·
·
·
·
KinectAvatarsDemo1, located in KinectDemos/AvatarsDemo-folder. Move around to see how the
avatars and the cube-man reflect your movements. Try one or more of the suggested gestures.
KinectAvatarsDemo2, located in the same folder. See how the first-person avatar (and the cube-
man) reflect your movements. Try to see your arms and legs.
KinectGesturesDemo1, located in KinectDemos/GesturesDemo-folder. Swipe left, right or up turn
the presentation cube left, right or up. You can also try the ‘Seated’ VGB gesture here.
KinectGesturesDemo2, located in the same folder. Use the Wheel-gesture to turn the model left or
right, or Zoom-in / Zoom-out to scale the model.
DepthColliderDemo, located in KinectDemos/ColliderDemo-folder. Move your body to bounce the
falling eggs.
ColorColliderDemo, located in the same folder. Touch any of the creatures with your hands to make
it jump. Each sound signals a collision event.
KinectInteractionDemo1, located in KinectDemos/InteractionDemo-folder. Use your left or right
hand to control the hand-cursor on the screen. Grip an object to drag it around. Open your hand to
release it. Try to interact with the GUI components, too.
·
·
·
KinectInteractionDemo2, located in the same folder. Grip the cube with your hand and turn it in all
directions.
KinectOverlayDemo1, located in KinectDemos/OverlayDemo-folder. Move your hands. See how the
green ball follows the position of your right hand on the screen.
KinectOverlayDemo2, located in the same folder. See how the spheres overlay the tracked joints,
and the lines – the bones between them.
·
·
KinectOverlayDemo3, located in the same folder. Close your hand to start drawing. Open it to stop.
KinectFaceTrackingDemo1, located in KinectDemos/FaceTrackingDemo-folder. See how the Kinect-
generated face model overlays your face on the screen.
·
·
·
KinectFaceTrackingDemo2, located in the same folder. See how the hat moves relative to your head.
KinectFaceTrackingDemo3, located in the same folder. See how the user face is tracked dynamically.
KinectFaceTrackingDemo4, located in the same folder. See how the face expressions (animation
units or AUs) affect the rigged face’s joints (eyebrows, mouth, etc.)
·
KinectSpeechRecognition, located in KinectDemos/SpeechRecognitionDemo-folder. Say clearly one
of the commands to control the robot. Repeat, if needed. Then open the xml-grammar file
‘SpeechGrammar.grxml’, located in the Assets/Resources folder of the Unity project, and modify the
commands, according to your needs. Save the grammar file and run the scene to try them out.
KinectBackgroundRemoval1, located in KinectDemos/BackgroundRemovalDemo-folder. See how the
cut-out user’s image is mixed with the background texture.
KinectBackgroundRemoval2, located in the same folder. Check how to set the cut-out user’s image
as a 2
nd
background layer and put 3d-objects on top of it.Scene0-StartupScene, located in KinectDemos/MultiSceneDemo-folder. Add Scene0, Scene1 and
Scene2 to the ‘Scenes in Build’-list in ‘File / Build Settings’. Then run the startup scene. This set of
scenes demonstrates how to use the Kinect-related managers across multiple scenes in a game.
KinectFittingRoom1, located in KinectDemos/FittingRoomDemo-folder. Stand in T-pose for
calibration. See how the clothing model overlays your body on the screen.
KinectFittingRoom2, located in the same folder. Stand in T-pose for calibration. See how the
humanoid model overlays your body on the screen.
KinectRecorderDemo, located in KinectDemos/RecorderDemo-folder. Say ‘Record’ to start recording
your body movements, or say ‘Play’ to replay the previously saved movements.
·
·
·
Installation of Kinect v2 SDK
1.
Download the Kinect for Windows SDK 2.0. Here is the download page: http://www.microsoft.com/en-
us/download/details.aspx?id=44561
2.
Run the installer. Installation of Kinect SDK/Runtime 2.0 is simple and straightforward.
3.
Connect the Kinect v2 sensor. The needed drivers are installed automatically.
4.
If you want to use the Kinect speech recognition, download and install the MS Speech Platform Runtime v11
(or Speech Platform SDK v11). Install both x86 and x64-packages, to be on the safe side. Here is the
download page: http://www.microsoft.com/en-us/download/details.aspx?id=27225
5.
For the Kinect speech recognition, you also need to download and install the respective language pack. Here
is the download page: https://www.microsoft.com/en-us/download/details.aspx?id=43662
Why Are There Two Avatars in the Scene
The meaning of the two avatars (3D humanoid characters) in the scene is to demonstrate that you can have both
– mirrored and non-mirrored movements in your scene, as well as avatars that follow multiple users.
First, you can have an avatar that mirrors your movement. This is the right one, facing you in the example scene.
As you can see, its transform has Y-rotation (rotation around Y-axis) set to 180 degrees. Also, there is an
AvatarController-component, attached to the avatar’s game object and its 'Mirrored Movement'-parameter is
enabled. Mirrored movement means that when you, for instance, lift your left hand the avatar lifts his right hand
and vice versa, like a mirror.
The left avatar, the one that has his back turned at you, is not mirrored. It reproduces your movements exactly
as they are. Your left is his left and your right is his right. Its transform has Y-rotation set to 0 and the 'Mirrored
Movement'-parameter of its AvatarController is disabled.
Also note that the left avatar is assigned to Player-index 0 (i.e. the 1
Player-index 1 (i.e. the 2 user). To make it follow the movements of the 1
index’ setting of its AvatarController-component to 0.st user), while the right one is assigned to nd 1st user as well, change the ‘Player
In order to get correct avatar position and movement, first position and rotate the avatar’s game object in the
scene, as needed. Then attach AvatarController-component to the avatar’s game object and set its 'Mirrored
Movement'-parameter accordingly.
How to Reuse the Kinect-related Scripts in Your Own Unity Project
1.
Copy folder ‘KinectScripts’ from the Assets-folder of the example to the Assets-folder of your project. This
folder contains all needed scripts, filters and interfaces.
2.
Copy folder ‘Resources’ from the Assets-folder of the example to the Assets-folder of your project. This
folder contains the needed libraries and resources. You may skip the libraries you don’t want to use.
3.
Copy folder ‘Standard Assets’ from the Assets-folder of the example to the Assets-folder of your project. It
contains the wrapper classes for Kinect v2.
4.
Wait until Unity detects and compiles the newly copied resources and scripts.
5.
Create a KinectController-object and add the ‘KinectManager’ as component to it.
6.
Enable ‘Compute User Map’ and ‘Display User Map’-parameters, if you want to see the user-depth map on
screen. Enable ‘Compute Color Map’ and ‘Display Color Map’-parameters, if you want to see the color
camera image on screen. Enable ‘Display Skeleton Lines’ parameter, if you want to see how Kinect tracks the
skeletons on the user-depth map.
7.
Add the ‘AvatarController’-component to each avatar (humanoid character) in the scene that you need to
control with the Kinect-sensor. Enable ‘Mirrored Movement’-parameter of the AvatarController, if the avatar
should mirror user’s movements.
8.
You can use the public functions of ‘KinectManager’, ‘InteractionManager’, ‘FacetrackingManager’ and
‘SpeechManager’ in your scripts, too. Examples: ‘CubeGestureListener.cs’ and ‘CubePresentationScript.cs’
used by the KinectGesturesDemo1-scene, ‘GrabDropScript.cs’ used by the KinectInteractionDemo1-scene,
‘KinectOverlayer.cs’ used by the KinectOverlayDemo1-scene, ‘ModelFaceController.cs’ used by the
KinectFaceTrackingDemo1-scene or ‘BotControlScript .cs’ used by the KinectSpeechRecognition-scene.
Additional Reading
The following how-to tutorials are also located in the Assets-folder of the example Unity-package:
1. Howto-Use-Gestures-or-Create-Your-Own-Ones.pdf
2. Howto-Use-KinectManager-Across-Multiple-Scenes.pdf
More Information, Support and Feedback
More information: http://rfilkov.com/2015/01/25/kinect-v2-tips-tricks-examples/
Web: http://rfilkov.com
E-mail: rumen.filkov@gmail.com
Twitter: roumenf
3
译文
怎样运行Kinect demo
2.下载并导入这个包
3.如果你想利用这里的shader替代处理器的图像处理,请确保
direct3d11是在“图形API”列表中第一个选项,在 Player Settings / Other Settings / Rendering目录中。
4.如果您想利用Kinect语音识别,下载并安装语音平台运行时或
SDK,以及所需的语言包,请按下一节所述的做。
5.打开并运行以下一个demo
KinectAvatarsDemo1 在KinectDemos/AvatarsDemo文件夹。动一动
看生成的你的人像(阿凡达 嘿嘿嘿)和cube小人如何反应你的动作,
多尝试几个姿势。
kinectavatarsdemo2 在相同的文件夹里,看第一人称的化身(和
cube人)是怎样反映你的动作的,试着看看你的手和脚。
KinectGesturesDemo1 在KinectDemos/GesturesDemo文件夹里。向
左右或者上面转,显示cube的左右或者上方。你也可以试试这里
的‘Seated’ VGB姿势。
KinectGesturesDemo2 在相同的文件夹。使用滚轮向左或向左转动
模型,或者放大/缩小缩放模型。
DepthColliderDemo 在KinectDemos/ColliderDemo 移动你的身体去
反弹落下的球。
ColorColliderDemo 在相同的文件夹。用你的手触摸生物使它跳跃
。每个声音都表示碰撞事件。
KinectInteractionDemo1 在KinectDemos/InteractionDemo文件夹
。用左手或右手控制屏幕上的光标。抓住一个物体把它拖过来。张开
你的手去释放它。也试着与GUI组件交互。
KinectInteractionDemo2 在相同的文件夹,握住立方体,然后向各
向转动。
KinectOverlayDemo1 在KinectDemos/OverlayDemo文件夹 移动你的
手。看绿色球如何在屏幕上跟随你右手的位置。
KinectOverlayDemo2 在相同的文件夹。看看这些球体如何覆盖追踪
的关节,以及它们之间的骨骼。
KinectOverlayDemo3 在相同的文件夹。合上你的手开始画画。打开
它停止。
KinectFaceTrackingDemo1 在 KinectDemos/FaceTrackingDemo文件
夹。看看Kinect生成的人脸模型是如何在屏幕上覆盖你的脸的。
KinectFaceTrackingDemo2 在相同的文件夹。看帽子怎样跟着你的
头动。
KinectFaceTrackingDemo3 在相同的文件夹。看怎样动态追踪使用
者的脸。
KinectFaceTrackingDemo4 在相同的文件夹。看面部表情(动画单
元或AUs)影响面部关节(如:眉毛、嘴等)
KinectSpeechRecognition 在KinectDemos/SpeechRecognitionDemo
文件夹。清楚地说出控制机器人的命令之一。如果需要,重复。然后
打开xml语法文件。SpeechGrammar.grxml 在unity 工程中的
Assets/Resources文件夹中,并根据您的需要修改命令。保存语法文
件并运行场景以试用它们。
KinectBackgroundRemoval1 在KinectDemos/BackgroundRemovalDemo
文件夹中。看看如何切断用户的图像与背景纹理混合。
KinectBackgroundRemoval2 在相同的文件夹里,检查如何设置断开
用户的图像作为第二背景层,并把3D对象放在上面。
Scene0-StartupScene 在KinectDemos/MultiSceneDemo文件夹中。
将Scene0, Scene1 and Scene2 加入到 ‘Scenes in Build’-list
in ‘File / Build Settings’中去。然后运行开始场景。这组场景
演示了如何在游戏中多个场景中使用Kinect相关的管理器。站成T型校
准。看看服装模型如何在屏幕上穿在你的身体上。
KinectFittingRoom2 在相同的文件夹。站成T型校准,看看人形模
型如何在屏幕上覆盖你的身体。
KinectRecorderDemo 在KinectDemos/RecorderDemo文件夹中,说“
记录”开始记录你的身体动作,或者说“播放”来回放先前保存的动
作。
安装Kinect v2 sdk
1.下载Kinect for Windows SDK 2.0在以下网址
http://www.microsoft.com/en-
us/download/details.aspx?id=44561
2.运行安装程序,安装Kinect sdk
3.连接Kinect v2传感器,需要的驱动是自动安装的
4.如果你想使用Kinect语音识别系统,现在并安装ms语音平台runtime
v11(或者语音平台sdk v11),谨慎起见,将x86和x64包同时安装。以
下是网址 http://www.microsoft.com/en-
us/download/details.aspx?id=27225
5.对于Kinect语音识别,你还需要下载安装独立的语言包,以下是下
载链接 https://www.microsoft.com/en-
us/download/details.aspx?id=43662
为什么会有两个人像在屏幕里
场景里有两个人像是为了证明你可以同时有镜像和非镜像在你的场景
里,当让也允许多用户使用。
首先,你可以有一个人像镜像的反应你的移动,在找你面对的实例场
景中右边的那一个,如你所见,他是将你绕着你的y坐标旋转180度。
当然,也有一个人像控制部件,启用连接人像游戏物体和它的镜像移
动参数。
左边的人像,背对着你的那个,是非镜像的。他尽可能精确地反应你
的行动,你的左边是他的左边,你的右边是他的右边,它的移动y轴是
0,并且它的镜像移动参数是关闭的。
仍然需要注意的是,左边的人像被分配给玩家索引0.右边的被分配给
玩家索引1,为了更好地跟随第一人称玩家,将其“player index”的
模型控制部件置成0.
为了得到正确的人像位置和移动,根据需要调整人像在场景中的初始
位置和旋转游戏对象,之后绑定人物控制部件和人像的游戏模型并且
相应的设置它的镜像移动参数。
怎样复用Kinect相关脚本在你自己的unity项目中
1.从例子中的帮助文件夹(Assets-folde)中复制‘KinectScripts’
包到你项目的帮助文件夹中,这个文件夹包含各种脚本,过滤器和接
口。
2.从例子的Assets-folde中复制 ‘Resources’到你的项目的
Assets-folde中,这个文件夹包含了需要的资料和资源,你可以跳过
你不需要的资源。
3.从例子的Assets-folde中复制 ‘Standard Assets’ 文件夹到你的
项目的 Assets-folde中。它包含了Kinect v2的包装器类。
4.等待unity检测到并编译完新复制的资源和脚本。
5.创建一个 KinectController对象并且将‘KinectManager’ 作为控
件加入其中。
6、‘Compute User Map’和‘Display User Map’参数为打开状态,
如果你想在屏幕上看见用户深度。如果你想在屏幕上看见彩色的摄像
机图像‘Compute Color Map’ 和‘Display Color Map’参数也置为
enable状态。如果你想看见Kinect是怎样在用户深度地图上追踪骨骼
的,将 ‘Display Skeleton Lines’参数置为enable。
7.将 ‘AvatarController’控件加入到屏幕上的你需要用传感器控制
的每一个人像上,将 人像控制器(AvatarController)的‘Mirrored
Movement’参数置为enable,如果人像要镜面反应用户的行动。
8.你也可以使用 ‘KinectManager’的公共方
法‘InteractionManager’,
‘FacetrackingManager’和‘SpeechManager’在你的脚本里。例如
:在KinectGesturesDemo1的场景中用到了‘CubeGestureListener.cs
’和‘CubePresentationScript.cs’。场景KinectInteractionDemo1
中用到了‘GrabDropScript.cs’等等。。。
补充阅读
以下的how-to教程也在示例unity包的 Assets文件夹中
1. Howto-Use-Gestures-or-Create-Your-Own-Ones.pdf
2. Howto-Use-KinectManager-Across-Multiple-Scenes.pdf
更多信息,支持和反馈
更多信息 http://rfilkov.com/2015/01/25/kinect-v2-tips-
tricks-examples/
网页 http://rfilkov.com
邮箱 rumen.filkov@gmail.com
推特 roumenf
这篇博客翻译了如何在Unity中运行与Kinect设备配合的演示场景,包括安装Kinect SDK、导入包、设置图形API以及利用Kinect进行语音识别、交互和面部跟踪等操作的详细步骤。博客提供了多个示例场景,如Avatar和Gesture的演示,以及安装Kinect v2 SDK的指南。
1万+

被折叠的 条评论
为什么被折叠?



