Kinect getting raw data and value

Hello!

I am a newbie. I was wondering if anyone know how to get raw values that measure distance in Kinect V1 and V2? I am also working via MacBook so I wonder if it makes much different in processing program.
My purpose is to transport this data to Touchdesigner and work from the scratch.

Please help me, I would appreciate a lot! Thank you.

1 Like

Check out Daniel Shiffman in Youtube.

If you have a Kinect2, then you can use the library

import org.openkinect.freenect.*;
import org.openkinect.freenect2.*;
import org.openkinect.processing.*;
import org.openkinect.tests.*;

Kinect2 kinect2;

and then get the raw depth as a list of ints:

int[] rawDepth = kinect2.getRawDepth();

They can be accessed like a pixels[] array, using x, y:

int val = rawDepth[y * kinect.depthWidth + x]

For a recent related discussion, see: