0
votes

I'm working on kinect v1 depth images. How do I find the distance in meters for the corresponding depth intensity value of each pixel? The intensity value ranges from 0-255 since it is a grayscale image and i don't have the raw depth data.

I've tried various ways to get the distance, such as using the following formulas:

- 1.0 / (raw_depth * -0.0030711016 + 3.3309495161)  
- 0.1236 * tan(rawDisparity / 2842.5 + 1.1863)

I've also tried to get the raw data by using:

raw = (255 - depthIntensity)/256*2047

How do i solve this problem?

1

1 Answers

1
votes

The Kinect actually sends something akin to a disparity image over USB. Both OpenNI and libfreenect are capable of converting that to a depth image using parameters reported by the device (baseline, focal length, and distance to reference plane, IIRC). e.g CV_CAP_PROP_OPENNI_BASELINE

In math form below, it is how we find the depth based on disparity

Depth = Baseline * focal length / disparity. The depth should be corresponding to the Z axis of current image frame.

enter image description here