ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As Felix said, OpenNI internally converts the raw disparity values to metric distances, so when using openni_kinect there's no longer any need to calibrate that conversion. If you're interested in how this was done, the code is in kinect_calibration, starting line 292.

Basically, the depth Z is related to a raw disparity reading r by Z = A / (B - r), where A and B are constants we are solving for. In calibration, we:

  1. Capture depth and IR images of a checkerboard with known size.
  2. Find the checkerboard corners in the IR image.
  3. Solve the PnP problem to get the 3d coordinates of each corner. (In the code, this is a by-product of calibrating the IR camera intrinsics.)
  4. Look up the corresponding raw disparity reading for each corner in the depth images.
  5. Given this set of (Z, r) observations, perform a least-squares fitting for A and B.