Kinect raw Depth Data
in
Contributed Library Questions
•
1 year ago
i've been trying to get raw depth data from the kinect using Dan shiffmans walkthroughs here:
http://www.shiffman.net/p5/kinect/
installed library, examples run , etc.
I've assembled my sketch, but it seems to freeze, and not grab any of the depth data i need. i know I'm missing something crucial but i don't know what. all help greatly appreciated. heres my code below:
- // Daniel Shiffman
- // Kinect Point Cloud example
- // http://www.shiffman.net
- // https://github.com/shiffman/libfreenect/tree/master/wrappers/java/processing
- import org.openkinect.*;
- import org.openkinect.processing.*;
- // Kinect Library object
- Kinect kinect;
- boolean depth = true;
- // We'll use a lookup table so that we don't have to repeat the math over and over
- void setup() {
- kinect = new Kinect(this);
- kinect.start();
- kinect.enableDepth(depth);
- // Lookup table for all possible depth values (0 - 2047)
- }
- void draw() {
- background(0);
- int[] depthraw = kinect.getRawDepth();
- println(depthraw);
- }
1