2

I'm about to start my final year project which requires me to develop the Kinect Fusion Algorithm. I was told to code in C++ and use the 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? (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? 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.

2 Answers 2

9

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. 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).

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.

  • OpenNI is the barebone framework - it only contains the architecture for natural interface data processing.
  • 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.
  • SensorKinect is the community-maintained driver for making the Kinect interact with OpenNI.

Mind you that these drivers don't provide a way to control the Kinect's tilt motor and the LED light. You may need to use libfreenect for that.

As for getting started, both the OpenNI and NITE packages contain source code samples for simple demos of the technology. 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.

As for learning C++, there are tons of materials out there. I recommend the book "Thinking in C++" by Bruce Eckel, if you're a technical person.

Sign up to request clarification or add additional context in comments.

4 Comments

Wow.. That looks extremely useful.. hmm.. Pardon me but i have a very simple and stupid question.. How to i really start? lol.. Do i just run the source codes in Microsoft Visual Studio? Or? I'm really sorry.. I just can't seem to understand.. I'm too used to programming and viewing output in the command prompt view.. So how can i modify codes and where/how do i view the output?
Yeah, as far as I remember the samples have Visual Studio project files with them. Just double click the .sln or .vcxproj file.
There are 2 files inside one of the samples folder.. 'NiSimpleCreate_2008' and 'NiSimpleCreate_2010'. When i tried opening the .vcproj file using my Microsoft Visual Studio Express 2012 for Desktop, i received errors. "NiSimpleCreate_2010: Error creating backup directory: C:\Program Files\OpenNI\Samples\NiSimpleCreate\Backup"
Refer to the Visual Studio manual. Don't get me wrong, I'm not here to teach you how to use MSVS.
0

There are multiple examples written for OpenNI, available at the GitHub repository: https://github.com/OpenNI/OpenNI

Your best place to start is to review the Resources Page at OpenNI.org, followed by the Reference Guide. Then tackle several of the examples -- run them, step through them and modify them to understand how they are working.

3 Comments

The problem with the current version of OpenNI is that it doesn't have a Kinect driver yet. So unless you have a sensor from PrimeSense, it's pretty much useless right now.
Is that the 2.0 or 2.1 (or both) driver set?
Both, at least that was the situation about a month ago, when I started working on my project. I was forced to dig through the internet to find archived versions of packages that actually worked with the Microsoft device - that's how I found that simple-openni project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.