Ask Your Question

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

asked 2012-08-13 03:47:47 -0500

rosmaker gravatar image

updated 2012-08-13 13:50:09 -0500

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?

At (

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 flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2012-08-20 12:29:13 -0500

Hansg91 gravatar image


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.

edit flag offensive delete link more

answered 2012-08-16 17:25:16 -0500

joq gravatar image

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

edit flag offensive delete link more

answered 2012-08-19 22:12:56 -0500

ha gravatar image

updated 2012-08-20 12:48:04 -0500

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

not 11bit.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-13 03:47:47 -0500

Seen: 1,095 times

Last updated: Aug 20 '12