How can I access the Kinect using Java?

Alex picture Alex · Jul 20, 2012 · Viewed 10.3k times · Source

I am currently in a Computer Vision course and for my final project I am going to make a small game that interacts with the Kinect.

Now I want to make this game in Java as I have never really ventured into making a game before and I am very comfortable with the Language. But I cannot seem to find a way to just access the Depth data (I just need to pack it into some Java Data structure) and the RGB data (same idea).

Right now, I have a way to 'talk' to the Kinect. I followed this tutorial and can detect the kinect using the command glview in terminal.

I have a thing called Processing which promised to be a Java library to let me use the Kinect but it is using it's own language which is 'built' using Java so it's not really Java which means I can't use all the GUI and normal Java features.

What I want to do is somehow call some import random.Kinect.code; at the top of the Java program that lets me use the most basic Kinect features, like getDepth() or getRGB() and do everything else in Java.

Does anyone know a way I can do this? (BTW I'm running MAC OSX Lion)

Answer

George Profenza picture George Profenza · Jul 20, 2012

If you're using Processing I recommend using one of the available wrappers:

Both are well documented and include plenty of helpful examples.

simpleOpenNI sample