没有合适的资源?快使用搜索试试~ 我知道了~
首页kinect V2 学习资料
资源详情
资源评论
资源推荐
The Hands On Labs to complete a sample application for Windows 8.1 and the
Kinect 2 for Windows
GitHub
Estimated Time to Complete: 10min
This lab is part of a series which takes you through the creation process of a Windows 8.1
Store Application which uses every available feature of the Kinect 2. This is the first lab in
the series, and it shows you how to set up the initial development environment to build an
app using Kinect 2.
This lab will explain the following:
Lab 01 - Project Setup
How to make a new project for Windows 8.11.
How to download and reference the Kinect 2.0 SDK.2.
How to get the Kinect 2 sensor in code and build a successful app.3.
How to open the sensor and turn on the Kinect 2 from code.4.
This lab comes with a starting point solution and a completed solution of the covered
exercises if required.
This exercise will show you how to set up the development environment for building a
Kinect for Windows 2 application in Windows 8.1, and how to access the Default Sensor
in code. This lab and all subsequent labs in this series are built using C# and assume you
have a fundamental knowledge of the language. The screenshots here are from Visual
Studio Pro 2013 Update 2 but Community Edition is identical.
Open Visual Studio 2013 and create a new project in a directory you can access. Click
File > New > Project and select a Blank App for Windows in C#. Name the project
Kinect2Sample. Then click OK to create the project:
1.
The project will be created with the default MainPage.xaml and App.xaml, and added to
the project in the Solution Explorer on the right:
2.
If you have not downloaded the public Kinect 2 SDK, you should download it and install
it before proceeding: http://www.microsoft.com/en-us/download/details.aspx?id=44561
~280MB
3.
Once installed, the Kinect 2 SDK can be referenced for use in the new project. In the
Solution Explorer, right click References and click Add Reference… to open the
Reference Manager.
4.
To add the WindowsPreview.Kinect.dll which uses the .NetCore library (suitable for
Windows Store apps), follow these steps:
a. Click Extensions on the left.
b. In the center panel, scroll down to the bottom and check
WindowsPreview.Kinect.
c. Click OK to add the reference.
5.
Kinect 2.0 applications are compatible with x86 and x64 architectures, but are not
compatible with ARM systems. This dependency from the Kinect 2.0 library means that
you must change the project configuration to either x86 or x64 instead of the currently
set “Any CPU” .
6.
a. Click BUILD then Configuration Manager… to open the Configuration Manager.
b. Click the dropdown box under Active Solution Platform: and select x64.
c. Click Close.
d. Open the project properties by right Clicking the Kinect2Sample project in the
solution explorer, then clicking Properties.
e. Click the Build tab on the left, then beside Platform: select x64 from the
dropdown.
f. Click FILE, then Save All or hit Ctrl + Shift + S to save all files.
Now you can build and run the application to make sure the references work and are
compatible. Click BUILD then Build Solution, then the project will build and should
present no errors. To Run or Debug the application you can either:
a. Click DEBUG then Start Debugging, or
b. In the Debug toolbar, click the Green Play Arrow button next to the target
environment which should be set to Local Machine.
The application will install on the Local Machine as a Windows 8.1 Store app and
launch itself with Visual Studio as the attached debugger.
7.
Upon running or debugging the application, you will see a gray screen, because there
is nothing yet in the application to show. Back in Visual Studio, select the menu
DEBUG, Stop Debugging or click the Red Stop Square in the Debugging toolbar.
In the future, the steps 7 and 8 are required when asked to Build and Run the
application.
8.
Open the MainPage.xaml.cs code behind file in Visual Studio by double clicking it.9.
To get the default sensor for the Kinect, add the WindowsPreview.Kinect namespace,
and a private class level variable for the KinectSensor. Then in the constructor of
MainPage class select the default sensor and open it. To do this, add the highlighted
code below:
10.
// ... other namespaces
using WindowsPreview.Kinect;
namespace Kinect2Sample
{
public sealed partial class MainPage : Page
{
private KinectSensor kinectSensor = null;
public MainPage()
{
// one sensor is currently supported
this.kinectSensor = KinectSensor.GetDefault();
// open the sensor
this.kinectSensor.Open();
this.InitializeComponent();
}
}
}
Now add the Capability for the application to use the Kinect as a webcam and
microphone device. Open the Package.appxmanifest by double clicking it in the
Solution Explorer. Navigate to the Capabilities tab, then tick the Microphone and
Webcam capabilities:
11.
剩余74页未读,继续阅读
nutriu
- 粉丝: 30
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0