Robots Atlas>ROBOTS ATLAS
Computer Vision

Stereo depth

ActiveUpdated: 28 October 2026Published
Key innovation
Recovers a dense depth map passively from two ordinary cameras by matching corresponding points and triangulating — with no active light emitter.
Category
Computer Vision
Abstraction level
Building block
Operation level
DataInference
Use cases
Depth perception in mobile robots and humanoidsNavigation and obstacle avoidanceGrasping and manipulation (bin picking)3D mapping and SLAMAutonomous vehicles and ADASDepth cameras (Luxonis OAK, Intel RealSense)

How it works

1) Calibration and rectification: the cameras' intrinsic and relative parameters are estimated and the images are warped so epipolar lines are horizontal (matches lie on the same rows). 2) Matching (correspondence): for each pixel a match is sought along the row in the other image by minimising a matching cost (e.g. SAD/SSD over a window, Census, or learned CNN features). 3) Disparity map: the positional difference of matched pixels forms a dense disparity map; cost aggregation (e.g. Semi-Global Matching) smooths it. 4) Triangulation: disparity is converted to depth via Z = f·B/d and then to a 3D point cloud. 5) Optional post-processing: filtering, hole filling and left-right consistency checks.

Problem solved

Lets a system measure distance and reconstruct a scene in 3D from 2D images using ordinary cameras, without an active emitter (as in ToF or structured-light scanners), so it works in bright sunlight and at longer ranges limited only by baseline and resolution.

Components

Calibration and rectification

Estimating camera parameters and warping the images so corresponding points lie on the same rows (horizontal epipolar lines).

Correspondence matching

Finding, for each pixel, its match in the other image by minimising a matching cost (SAD/SSD/Census or CNN features).

Disparity map

A dense map of horizontal shifts between matched pixels; often smoothed by cost aggregation (e.g. SGM).

Triangulation / reprojection

Converting disparity to depth (Z = f·B/d) and to a 3D point cloud using baseline and focal length.

Implementation

Implementation pitfalls
Textureless regionsHigh

Uniform surfaces (plain walls, sky) give no unambiguous matches, producing holes and wrong disparity.

Fix:Add texture with an active pattern projector, use cost aggregation (SGM), and consistency filtering.
OcclusionsMedium

Points visible in only one camera have no match, causing errors at object boundaries.

Fix:Left-right consistency checks and occlusion filling.
Repetitive patternsMedium

Repeating textures (grids, fences) lead to ambiguous matches.

Fix:Larger window/context, global constraints, and learned features.
Calibration and rectification errorsHigh

Inaccurate calibration breaks the horizontal-epipolar-line assumption and corrupts matching and depth scale.

Fix:Careful calibration, rigid mounting and periodic recalibration.

Evolution

2002
Taxonomy and evaluation of dense two-frame stereo (Scharstein and Szeliski)
Inflection point

Standardised the stages of stereo matching and the Middlebury benchmark.

2005
Semi-Global Matching (Hirschmüller)
Inflection point

Practical, accurate and fast cost aggregation, widely used in real time.

2016
MC-CNN — CNN for comparing image patches (Žbontar and LeCun)
Inflection point

First use of a learned matching cost, starting deep-learning stereo.

2018
PSMNet — Pyramid Stereo Matching Network (Chang and Chen)

A complete end-to-end learned stereo pipeline with a 3D cost volume.

2021
RAFT-Stereo (Lipson, Teed, Deng)

Recurrent multilevel disparity refinement with high accuracy.

Hyperparameters (configurable axes)

Stereo baselineHigh

Distance between cameras; a larger baseline improves accuracy at range but raises the minimum range and occlusion areas.

Focal lengthMedium

Focal length in pixels; together with baseline scales the disparity-to-depth conversion.

Disparity rangeHigh

Number of disparity levels searched; sets the nearest measurable distance and the compute cost.

Matching window sizeMedium

Comparison window size in local methods; a larger window is more robust to noise but blurs edges.

Computational complexity

Time complexity: O(W·H·D).

Execution paradigm

Primary mode
Dense

Disparity is computed densely for every image pixel.

Activation pattern
All paths active

Parallelism

Parallelism level
Partially parallel

Cost-volume computation and per-pixel matching are highly parallel; the path aggregation in SGM introduces sequential dependencies along paths.

Scope
Inference

Hardware requirements

Good fit

Learned stereo methods (e.g. PSMNet, RAFT-Stereo) benefit from GPU acceleration for convolutions and the cost volume.

Possible

Classical SGM/block matching is implemented on FPGA/ASIC and vision processors (e.g. inside depth cameras) for low-power real-time stereo.

Possible

Local block matching (e.g. OpenCV StereoBM) runs on an ordinary CPU.