How can 'Depth Maps' be created from stereo images?

Instruction: Explain the process of generating depth maps using stereo images.

Context: This question assesses the candidate's knowledge of stereo vision and 3D reconstruction techniques.

Updated

Example Answer

For a stereo depth map, I would calibrate and rectify the camera pair, compute dense disparity, reject unreliable matches and convert valid disparity to depth. Sparse SIFT or ORB matches can support geometry estimation, but they do not alone produce dense depth. In the rectified pinhole case, depth is focal length times baseline divided by disparity. The units must agree, and zero, tiny or invalid disparities need explicit handling rather than producing a plausible-looking distance.

Make it your own

Illustrative arithmetic: f = 800 pixels, B = 0.12 metres, d = 24 pixels gives Z = 4 metres. If a matcher uses scaled integer disparity, convert it to pixel units first.

Why this works

The arithmetic exposes unit errors. Occlusion, textureless areas and reflections can invalidate correspondence. Follow-up: why does the same disparity error create larger depth error far away?

Sources: OpenCV stereo depth, OpenCV calibration and reconstruction.

Related Questions