# I find kinect depth fomula, Is it right? modified Question

Hi. I find kinect depth fomulas.

But, I'm wondering how to know relationship of depth value using OpenNi?

In libfreenect, this formulas

1. float dist =100/(-0.0030711016*rawdisparity + 3.3309495161); //ros distance (cm)

2. float dist2 = 12.36 * tanf(rawdisparity/ 2842.5 + 1.1863); //Stéphane Magnenat distance (cm)

Can I use the fomulas in OpenNi?

There is the depth fomula

z = b*f / (1/8 * (doff - kd))

Is the same true for the OpenNi driver?

Can you talk to me how to get the depth relation?

I'm using ubuntu and OpenNi driver.

I saw the disparity has 11-bit value.

So disparity range is 0-2047.

If it is true, any disparity makes the formula's denominator zero(0).

Then, the formula is infinity.

How did this happen?

Disparity 11bit, is it right??

edit retag close merge delete

Sort by » oldest newest most voted

Hi,

If you are using OpenNI, then your Kinect should also be publishing on a topic called /camera/depth/image_raw. The images published on this topic are already calculated to real world depth with taking the Kinect as the origin. You shouldn't be needing a formula to calculate this on your own.

Hope this helps.

more

The supported ROS depth image representations are described in REP-0118.

more

Kinec topic /camera/depth/image_raw is published just 8bit.

not 11bit.

more