Tuesday, April 26, 2011

Getting started with coding for the Kinect on Windows

Microsoft's Kinect has generated a lot of interest in the scientific and mod community and the good news is, it's not very hard (for a C or C++ programmer) to get started with coding for it, even if you don't want to wait until the official API is released, later this spring.

A good tutorial to get things up and running can be found here. It is, however, a bit dated, and some of the details merit further discussion, namely:
  • What OpenNI version should you install? The Windows installer for the SensorKinect drivers will only let you install the drivers if it detects OpenNI. However, at the time of this writing, it only works with the latest OpenNI unstable version, and does not detect 64-bit OpenNI installations. To make a long story short, if you're on Windows, install the latest 32-bit unstable version.
  • Reboot after installing the drivers: At least in my case, the "First test" mentioned in that tutorial did not work. I've had to reboot before the Kinect was detected and the samples ran normally.
  • About NITE: As far as I can tell, NITE just uses OpenNI in order to do its thing, so it is entirely optional. It seems like that wasn't the case when that tutorial was written. Nevertheless, it provides a decent number of code samples, covering parts of the API that OpenNI's own samples do not. Skeleton tracking is an example of one of those parts.
If you find yourself looking at a NITE sample program, and you can't figure out what it's supposed to do, you can look here for a description of what each one does.
    When it comes to getting things up and running, that's about it. Stay tuned for some more details about coding with OpenNI.

    No comments:

    Post a Comment