← Computer Vision for EveryoneToolsInVisionLearning Center
Depth and Motion · Lesson 38

Check Where Stereo Matching Fails

A stereo depth map gives scattered distances on the blank side of a van.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

A stereo depth map gives scattered distances on the blank side of a van.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

The stereo depth map looks colorful, but the blank side of a van has scattered distances. There is little texture there to match reliably. Reflections and occlusion near the van's edge cause further problems.

02

The useful idea

Compare left and right views beside the depth map. Does each questionable pixel have a visible partner? Check consistency by matching in both directions where possible. Boundaries can mix foreground and background, and repeated parking stripes can create several plausible disparities.

03

Work through the example

Mask invalid or low-confidence estimates rather than filling them with a confident-looking color. Measure error on a few known distances or calibrated objects across the scene, not just one easy center point. A shiny car may show different reflections in the left and right camera views. A matcher can report a confident-looking shift even when it has paired the wrong patches. Cover those reflective regions and inspect the disparity map around the car's boundary and a textured wall. Does the estimated depth change smoothly where the physical surface is smooth? A blank or low-confidence answer can be more honest than a precise but false distance. Keep the original image pair available so someone can inspect ambiguous correspondences. Now check the idea on a concrete example: Compare left and right views of the van and flag regions where no reliable match exists. A possible trap is worth naming: A dense depth map should not imply equal confidence at every pixel. This supports a careful conclusion: Stereo matching assumes comparable visible appearance; reflections, blank surfaces, and occlusions break that assumption. At the van's silhouette, one camera may see a strip of background the other camera cannot. No algorithm can match a truly invisible point there. Flag that boundary as uncertain and test depth on a textured, visible surface before treating the rest of the map as trustworthy.

04

Limits and next step

Depth is useful only where its correspondence and geometry support it. Next, we'll switch to consecutive frames from one camera and measure apparent motion instead.

Worked example

Compare left and right views of the van and flag regions where no reliable match exists.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Compare left and right views of the van and flag regions where no reliable match exists. Explain how you would check the result. In your answer, address this limitation: A dense depth map should not imply equal confidence at every pixel.

Check the reasoning

Stereo matching assumes comparable visible appearance; reflections, blank surfaces, and occlusions break that assumption. A dense depth map should not imply equal confidence at every pixel.

What is the main idea behind check where stereo matching fails?

Stereo matching assumes comparable visible appearance; reflections, blank surfaces, and occlusions break that assumption.

How is it used in the example?

Compare left and right views of the van and flag regions where no reliable match exists.

What limitation should be checked?

A dense depth map should not imply equal confidence at every pixel.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 38 transcript325 words · Narration ready for the upcoming videoOpen transcript

The stereo depth map looks colorful, but the blank side of a van has scattered distances. There is little texture there to match reliably. Reflections and occlusion near the van's edge cause further problems.

Compare left and right views beside the depth map. Does each questionable pixel have a visible partner? Check consistency by matching in both directions where possible. Boundaries can mix foreground and background, and repeated parking stripes can create several plausible disparities.

Mask invalid or low-confidence estimates rather than filling them with a confident-looking color. Measure error on a few known distances or calibrated objects across the scene, not just one easy center point. A shiny car may show different reflections in the left and right camera views. A matcher can report a confident-looking shift even when it has paired the wrong patches. Cover those reflective regions and inspect the disparity map around the car's boundary and a textured wall. Does the estimated depth change smoothly where the physical surface is smooth? A blank or low-confidence answer can be more honest than a precise but false distance. Keep the original image pair available so someone can inspect ambiguous correspondences. Now check the idea on a concrete example: Compare left and right views of the van and flag regions where no reliable match exists. A possible trap is worth naming: A dense depth map should not imply equal confidence at every pixel. This supports a careful conclusion: Stereo matching assumes comparable visible appearance; reflections, blank surfaces, and occlusions break that assumption. At the van's silhouette, one camera may see a strip of background the other camera cannot. No algorithm can match a truly invisible point there. Flag that boundary as uncertain and test depth on a textured, visible surface before treating the rest of the map as trustworthy.

Depth is useful only where its correspondence and geometry support it. Next, we'll switch to consecutive frames from one camera and measure apparent motion instead.