简体   繁体   English

使用OpenNI开始编程Kinect应用程序

[英]Start programming Kinect application using OpenNI

I'm about to start my final year project which requires me to develop the Kinect Fusion Algorithm. 我即将开始我的最后一年项目,这需要我开发Kinect融合算法。 I was told to code in C++ and use the OpenNI API. 有人告诉我用C ++编写代码并使用OpenNI API。

Problem: 问题:

  • I read up online but I am still confused as to how to start. 我在线阅读但我仍然对如何开始感到困惑。 I installed Microsoft Visual Studio 2012 Express as well as OpenNI, but how should I start? 我安装了Microsoft Visual Studio 2012 Express以及OpenNI,但我该如何开始? (I was told to practice coding first before starting to work on the project) (我被告知在开始研究项目之前先练习编码)
  • If I want to practice and understand how the codes work and how the Kinect respond to the code, any advice on how should I start? 如果我想练习并理解代码如何工作以及Kinect如何响应代码,那么我应该如何开始提出建议? As I am REALLY lost at the moment and hitting a dead end, not knowing what to do next with many of the information online which I do not really understand. 因为我现在真的迷失了并且走到了死胡同,不知道接下来要做什么,网上有很多我不太懂的信息。

First of all, if you're planning to use OpenNI with Kinect, I advise you not to use version 2.0, which is available at the official website. 首先,如果您计划将OpenNI与Kinect一起使用,我建议您不要使用官方网站上提供的2.0版本。 The reason is simply that there currently is no driver yet to support the Microsoft Kinect (the company behind OpenNI - PrimeSense - only supports a driver for their own sensor, which is different from the Kinect, and the community hasn't gotten round to writing a Kinect driver yet). 原因很简单,目前还没有支持Microsoft Kinect的驱动程序(OpenNI背后的公司 - PrimeSense - 只支持自己的传感器驱动程序,这与Kinect不同,社区还没有完成写作一个Kinect驱动程序)。

Instead grab the package from the simple-openni project 's downloads page - it contains everything to get you going: libraries from the 1.5.x line. 而是从simple-openni项目的下载页面中获取包 - 它包含了所有内容:1.5.x行的库。

  • OpenNI is the barebone framework - it only contains the architecture for natural interface data processing. OpenNI是准系统框架 - 它只包含自然界面数据处理的体系结构。
  • NITE is a proprietary (freeware) library by PrimeSense that provides code to process the raw depth images into meaningful data - hand tracking, skeleton tracking etc. NITE是PrimeSense的专有(免费软件)库,提供将原始深度图像处理成有意义数据的代码 - 手部跟踪,骨架跟踪等。
  • SensorKinect is the community-maintained driver for making the Kinect interact with OpenNI. SensorKinect是社区维护的驱动程序,用于使Kinect与OpenNI交互。

Mind you that these drivers don't provide a way to control the Kinect's tilt motor and the LED light. 请注意,这些驱动程序无法提供控制Kinect倾斜马达和LED灯的方法。 You may need to use libfreenect for that. 您可能需要使用libfreenect

As for getting started, both the OpenNI and NITE packages contain source code samples for simple demos of the technology. 至于入门,OpenNI和NITE软件包都包含用于简单演示技术的源代码示例。 It's a good idea to start with one and modify it to suit your needs. 从一个开始并根据您的需要进行修改是一个好主意。 That's what I've done to get my own project - controlling Google Chrome with Kinect - working. 这就是我为了获得自己的项目而做的 - 用Kinect控制谷歌Chrome - 正在运作。

As for learning C++, there are tons of materials out there. 至于学习C ++,那里有大量的材料。 I recommend the book "Thinking in C++" by Bruce Eckel, if you're a technical person. 如果你是技术人员,我推荐Bruce Eckel写的“Thinking in C ++”一书。

There are multiple examples written for OpenNI, available at the GitHub repository: https://github.com/OpenNI/OpenNI 为OpenNI编写了多个示例,可以在GitHub存储库中找到: https//github.com/OpenNI/OpenNI

Your best place to start is to review the Resources Page at OpenNI.org , followed by the Reference Guide . 您最好的起点是查看OpenNI.org上资源页面 ,然后查看参考指南 Then tackle several of the examples -- run them, step through them and modify them to understand how they are working. 然后解决几个例子 - 运行它们,逐步执行它们并修改它们以了解它们是如何工作的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM