Semi-Global Block Matching
SGBM estimates stereo disparity by matching local image patches while smoothing the result across paths.
Site connection
The depth estimation project used OpenCV and SGBM to build stereo disparity maps.
Visual model
Disparity changes with correspondence
The demo compresses the core idea: matched points shift more when the object is closer.
Interactive
Larger disparity means a closer object
Estimated depth index: 43. The exact unit depends on focal length and baseline calibration.
Block Matching
The algorithm searches for similar patches between the left and right camera images. The horizontal offset between a matching pair becomes disparity.
Semi-Global Smoothing
Pure local matching is noisy. SGBM adds penalties so neighboring disparities prefer to vary smoothly unless image evidence says otherwise.
Common Pitfalls
- Expecting good matches on blank walls.
- Using unrectified camera images.
- Over-smoothing real depth discontinuities.
Quick check
Quiz
What does stereo block matching try to find?
- Similar patches across left and right images
- The fastest CPU core
- A language token
- Only the image center
Disparity comes from matching corresponding visual patches.