Before I can start coding and use the Kinect in my own projects, I need to find a way to access it from inside a familiar programming environment. I decided to use Processing/Java for it.
Daniel Shiffman’s wrap of libfreenect to processing as an easy to use off-the-shelf library. Just download it, put it into your sketchbooks libraries-folder and start working.
For easy access inside processing for Windows users there seem to be 2 choices available: CLNUI 4 Java or dLibs. Both of them seem to be essentially JNA wrappers for C++/C# libraries. Victor Martins clnui4j which is based on the original CLNUI by Codelaboratories (the same people who hacked PS3 Eye camera drivers for windows). dLib by Thomas Diewald which ships with a precompiled version of libfreenect for Windows (requires Microsoft Visual C++ 2010 Redistributable Package to be installed). Both of them seem to work fine on my machine – however, dLib seems to be the better choice at this moment in time, for two reasons. First it worked off the shelf from inside the processing IDE – which was not the case for the clnui4j. This makes it more handy when it comes to including the Kinect into student projects. Second, it seems that the furutre of the originial CLNUI project is uncertain and that it might die – that would logically mean the end for the wrapper library based on it aswell.
Update: There seems to have emerged a third – much easier option – called simple-openni. It allows the usage of scene-analysis and skeleton-tracking directly from OpenNI and NITE frameworks (which have to be installed aswell). As the only function missing when I tested it was tilting the camera, I decided to work with this solution for all my projects.
Despite it being actually very easy to get the Kinect to work on Ubuntu, and the existence of JNA/JNI wrappers for libreenect, the only pure processing IDE solution I stumbled upon was this workaround/port of Shiffman’s processing library by Nikolaus Gradwohl. However using the provided wrappers inside Eclipse works fine so far.