how to use the libfreenect processing wrapper on ubuntu

Nikolaus Gradwohl2010-12-28T05:29:13+01:00

Yesterday I got a Kinect and it worked out of the box with the freenect libs on my linux box and my mac. But the processing-wrappers from daniel shiffman only worked on the mac. Since my linux box has a bit more power than my mac-mini, I started to fiddle around a bit with the source code and - TATAAAA - it run's on my ubuntu box.

To make it run check out the git-repository for libkinect by using 'git clone'

git clone git://

Then build the library using cmake like it's described in the readme

then change to the wrapper/java directory. There you find a small shellscript that compiles the jni- and processing-wrappers. I had to add some include-paths to make the c-compiler find my jni.h and I changed the target system to 32-Bit (by removing the -m64 flag).

On my ubuntu box using the sun jdk the jni.h include-path is this.

-I/usr/lib/jvm/java-6-sun- -I/usr/lib/jvm/java-6-sun-

Then make sure the LIBFREENET_LIBRARY path points to the libfreenect.a file you compiled earlier. If you use a build directory like It's recommendet in the Readme file than don't forget to add it to the path (this took me some time :-/ )

after running the build script install the '' from the processing/distribution folder to your sketchbook/library folder and add the file from the dist directory to sketchbook/libraries/openkinect/library

and than make a symlink from '' to ''

ln -s

freenect processing wrapper

read more ...