1
votes

I'm working on depth reconstruction from disparity map. I use OpenCV to calibrate my stereo camera, then undistort and rectify the images. I use LibELAS to compute the disparity map.

My question is: According to OpenCV document (https://docs.opencv.org/3.1.0/dd/d53/tutorial_py_depthmap.html), the depth is computed by depth = Baseline*focal_length/disparity. But according to middlebury dataset (http://vision.middlebury.edu/stereo/data/scenes2014/), the depth is computed by depth = baseline * focal_length / (disparity + doffs). The "doffs" is "x-difference of principal points, doffs = cx1 - cx0".

What does the "doffs" mean ? How can I get the "doffs" from OpenCV calibration ?

1

1 Answers

0
votes

The OpenCV-Calibration gives you the intrinsic matrices for both of your cameras. These are 3x3 Matrices with the following style: (from doc)

  fx  0  cx
  0  fy  cy
  0   0   1

cx and cy are the coordiantes of your principle point. From there you can calculate doffs as stated by you. With ideal cameras these parameters are the center of the image. But in real cameras they differ in a few pixels.