Stereo Vision and Disparity Maps
Stereo vision estimates depth by comparing where the same scene point appears in two camera views.
Site connection
The depth estimation project compared stereo vision, SGBM, and machine learning depth models against measured distances.
Visual model
Disparity as a depth cue
Increase pixel disparity and the estimated depth drops because close objects shift more between camera views.
Interactive
Larger disparity means a closer object
Estimated depth index: 43. The exact unit depends on focal length and baseline calibration.
Two Views, One Point
A stereo camera setup observes the same scene from two positions separated by a baseline.
A point close to the cameras appears at noticeably different horizontal positions. A far point shifts less.
From Disparity to Depth
Disparity is the pixel difference between matching points in the left and right images. With calibration, focal length, and baseline, disparity can be converted into depth.
Block-matching methods such as SGBM estimate disparity by searching for similar image patches across the two views.
| Quantity | Meaning |
|---|---|
| Baseline | Distance between the two cameras |
| Focal length | Camera projection scale |
| Disparity | Pixel shift between matching points |
| Depth | Estimated distance from the camera rig |
Common Pitfalls
- Skipping camera calibration.
- Expecting textureless surfaces to match well.
- Comparing raw depth maps without understanding their scale.
- Assuming smoother ML depth maps are automatically more accurate.
Quick check
Quiz
If disparity increases while calibration stays fixed, what usually happens to estimated depth?
- It increases
- It decreases
- It becomes unrelated
- It always becomes zero
Nearer objects have larger disparity, so depth is inversely related to disparity.