Feb 21, 2011

Kinect with Processing on Ubuntu Linux

At last it seems to work!

We have been trying to make Kinect accessible from Processing with the help of OpenKinect's Java JNI Wrapper tutorial, Nikolaus Gradwohl's tutorial and some hints at this thread.

UPDATED 2nd June 2011: Just in case, here is the compiled processing openkinect library , and here the modified source and build file of Shiffman's wrapper for Ubuntu Lucid 10.04, 2.6.32-28 (tested with java-6-sun- and OpenKinect-libfreenect-4a159f8).


  1. I'm getting an error message "The package "org.openkinect.processing" does not exist. You might be missing a library." It appears it's having issues with the import org.openkinect.processing.* line. I'm not entirely familiar with Java, but I think my problem is that the "processing" directory is not being included in the openkinect.jar compile but I don't see anyone mentioning how to do this.

    Do you know how to correct this? I am positive I have the openkinect.jar in the correct sketchbook library location.

  2. Hi!

    I had some of that error too. I'll have to review the steps to see exactly how it was solved.
    There was a thing about the access rights to the usb bus files of the kinect that was also messy.
    I'll check everything again and tell you more.

  3. Can you please try with this version?

    I found that in my test I keeped the openkinect.jar released for the OSX library (renamed to "openkinect.kinect.jar") inside the sketchbook/libraries/openkinect/library folder, toghether with the openkinct.jar I compiled with ubuntu. With both files processing finds everything and is happier.

    The problem is that the examples refer to daniel shiffman's version of the wrapper (for OSX), which includes the package "org.openkinect.processing" with a class named kinect.

    I'll try to compile everything again in a single library file.

  4. UPDATE:

    I merged the contents of Daniel Shiffman's /processing classes in his .jar with the ones in the original OpenKinect.jar compiled in linux. The links above are updated so the library should work fine now.

  5. With the las freenect java wrapper the IR image is enabled but the performance drops a lot, even in RGB mode. Here is the sample library:

  6. This comment has been removed by the author.

  7. David!

    I appreciate all your updates but unfortunately I'm still having the "UnsatisfiedLinkError: no kinect in java.library.path". I had it working for awhile on Ubuntu 10.10 and then out of the blue it stopped working. I've now installed Ubuntu 10.04 32-bit and tried using your libraries but I get the same "UnsatisfiedLinkError".

    I know I have my looking very similar to what your's looked like and I don't get any errors once I run the script. Any idea why my is screwing up? What files are you transferring over to the sketchbook/libraries/openkinect/library.

    Thanks David! Huge help. Hope I get this working soon.

  8. @The Poly Ninja

    Hi, sorry for the late answer, did you try the last version I uploaded?


  9. I've just updated the library to make it work with the latest OpenKinect image from the official branch. Had to make a few changes to Shiffman's code and JNI.

    Here is the new compiled library:

    And here the modified wrapper source and files:

  10. Great job!
    Do you know any high level API working with OpenKinect?
    I'm searching for a skeleton tracking algorithm to use in processing but it's too hard to find...

  11. Thanks!

    Buth thank also Daniel Shiffman ( for developing the original wrapper.

    We have been experimenting with oF, OpenNI and the Primesense skeleton tracking with success. See this post:

    Also in our latest post, we show a practical case of using OSCeleton to capture the data and send it via OSC to any client application:

    You may receive this OSC data with processing. See an example here: