0
$\begingroup$

Rosanswers logo

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 (http://www.ros.org/wiki/kinect_calibration/technical)

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??


Originally posted by rosmaker on ROS Answers with karma: 51 on 2012-08-13

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Hansg91 with karma: 1909 on 2012-08-20

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by joq with karma: 25443 on 2012-08-16

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.