In preparation for a Kinect hacking session at Microsoft’s 2011 Social Computing Symposium, I put together a documentation and tutorial page for the Processing kinect library:
Category Archives: kinect
Updated Kinect Library for Processing
A quick post to announce an updated Kinect library for Processing on github. This new library uses the most recent libfreenect drivers (mac os x only still) and builds off of the existing JNI Java Wrapper. Links:
Download library and example:
openkinect.zip
Source:
https://github.com/shiffman/libfreenect/tree/master/wrappers/java/processing
My tests show 30 FPS no problem for either the depth or RGB image, if you request both images, however, I’m only currently getting about 20 FPS. The update fixes a few bugs, exposes the raw depth data and includes a point cloud demo (see above video).
I have a list of “to-do” items here:
https://github.com/shiffman/libfreenect/issues
(a shortened version of the very long list in my head)
Kinect and Processing
This is all very preliminary, but here is a first pass as a Processing Kinect library:
http://www.shiffman.net/p5/kinect.zip
(Mac OSX only for now, sorry!)
UPDATE (12/18/10): New version of the library can be downloaded from github:
Source: https://github.com/shiffman/libfreenect/tree/master/wrappers/java/processing
None of this would have been possible without the heroic efforts of Hector Martin, the OpenKinect project, and various members of the openFrameworks community. There’s a great thread with discussion and code here:
http://www.openframeworks.cc/forum/viewtopic.php?f=14&t=4947
Video in action here:
Processing code looks like:
import shiffman.kinect.*; PImage img; PImage depth; void setup() { size(640,240); NativeKinect.init(); img = createImage(640,480,RGB); depth = createImage(640,480,RGB); } void draw() { NativeKinect.update(); img.pixels = NativeKinect.getPixels(); img.updatePixels(); depth.pixels = NativeKinect.getDepthMap(); depth.updatePixels(); image(img,0,0,320,240); image(depth,320,0,320,240); } |

