Tag Archives: kinect

OpenNI Kinect with XCode Mac OS X

I havent posted anything in ages! So many half finished projects!

Anyway, I have a kinect project to work on for somebody. I have had a kinect for ages and got libfreekinect working but never really did anything with it. Since then OpenNI released a whole framework that provides things such has skeleton and gesture tracking. Thats a whole lot of work done for you for free!

This instructions for installation etc… on Mac OS X can be found here http://developkinect.com/resource/mac-os-x/install-openni-nite-and-sensorkinect-mac-os-x. You will need to have macports up and running and be familiar on how to install applications from it. This is easy to find on google.

Its worth noting that to get this to run on OS X you need to install a separate driver that is not provided by OpenNI. I thought I had done this, but when I ran any examples i got the error “cannot find port” or something like that. So after installing it a second time all the examples ran. It is all well and good getting the samples running but you need to be able to manipulate them to shape it in to your own work. So, to an IDE!

I had a quick look at using eclipse, for the more cross platform friendly building but I havent got it to work yet. Its only a linking issue cause by OS X frameworks, so shouldn’t take much longer. In the mean time here is house to get it working in XCode. Again someone has already done it for me http://davidbliss.com/getting-up-and-running-with-openni-and-nite-o. I was focussing my attention on the UserTracker example so copied the source in to a new XCode project and followed the methods provided by the previous link. Alas, it did not quite work. The linker could not find /usr/lib/libXnVFeatures.dylib, so rename it to /usr/lib/libXnVFeatures_1_5_2.dylib, or create a dynamic link to /usr/lib/libXnVFeatures_1_5_2.dylib, and the same for /usr/lib/libXnVHandGenerator_1_5_2.dylib. Everything now compiles.

Running the program exits immediately because it cannot open some file. After some trial and error of copying over folders and files from the examples folder, it turned out to be ../../Config/SamplesConfig.xml. So, the user tracking works, and shows a nice skeleton of a user moving around. Im hoping to next link up OpenFrameworks and manipulate