Computer Vision Interview 20 essential Q&A Updated 2026
stereo

Stereo Vision: 20 Essential Q&A

Disparity, baselines, rectification, and classical dense matching for depth maps.

~11 min read 20 questions Advanced
disparitybaselinerectifySGBM
1 What is stereo vision? ⚡ easy
Answer: Using two (or more) calibrated views with known baseline to recover depth via triangulation of corresponding points.
2 Define disparity. 📊 medium
Answer: Horizontal shift between corresponding pixels in a rectified stereo pair—larger disparity means closer surface (inverse relation to depth).
3 Depth from disparity? 📊 medium
Answer: Z ≈ f × B / d (f focal length, B baseline, d disparity)—assumes rectified parallel cameras and pinhole model.
4 Baseline tradeoff? 📊 medium
Answer: Larger B increases depth precision (more parallax) but worsens occlusions and matching in narrow scenes; small B reduces measurable disparity range.
5 What is rectification? 🔥 hard
Answer: Warp both images so epipolar lines are horizontal scanlines—reduces correspondence search to 1D and simplifies disparity.
6 Epipolar constraint? 📊 medium
Answer: Without rectification, match for a point lies on a line in the other image—comes from epipolar geometry of two views.
7 What is stereo matching? 📊 medium
Answer: For each pixel (or patch), find best match along epipolar line using photometric cost (SAD, census, CNN features).
8 Cost volume? 🔥 hard
Answer: 3D array H×W×D of matching costs over disparity levels—winner-take-all or global optimization (SGC, belief propagation) picks disparities.
9 What is SGM? 🔥 hard
Answer: Semi-Global Matching aggregates costs along many paths with smoothness penalties—good quality/speed tradeoff in OpenCV StereoSGBM.
10 Occlusion regions? 📊 medium
Answer: Pixels visible in only one view have undefined disparity—detected by consistency checks or left-right validation.
11 Sub-pixel disparity? 📊 medium
Answer: Parabolic fit around discrete minimum or phase-based methods—needed for smooth surfaces and accurate 3D.
12 Common errors? 📊 medium
Answer: Calibration errors, textureless regions, repetitive patterns, specular highlights, and motion if scene moves between exposures.
sgm = cv2.StereoSGBM_create(minDisparity=0, numDisparities=128, blockSize=5)
disp = sgm.compute(imgL, imgR)
13 StereoBM vs SGBM? ⚡ easy
Answer: BM: fixed small block, fast, blocky. SGBM: semi-global, slower, smoother—preferred when quality matters.
14 Monocular depth? 📊 medium
Answer: Single image lacks scale without priors—learned networks predict relative depth; stereo gives metric depth with calibration.
15 vs RGB-D? ⚡ easy
Answer: Structured light / ToF gives depth directly—no correspondence problem but range/resolution limits; stereo passive but needs texture.
16 Multi-view stereo? 🔥 hard
Answer: Fuse many images (MVS) for dense point clouds—used in photogrammetry beyond two-camera stereo.
17 Stereo in driving? 📊 medium
Answer: Wide-baseline camera pairs on vehicles for obstacle depth; often fused with radar/LiDAR and learned refinement.
18 Fuse with LiDAR? 🔥 hard
Answer: Sparse accurate LiDAR anchors depth map from stereo; learning-based fusion common in autonomy stacks.
19 Learned stereo? 📊 medium
Answer: CNNs build cost volumes or regress disparity directly (e.g. PSMNet)—strong on benchmarks when enough training data.
20 Need calibration? ⚡ easy
Answer: Yes for metric depth—need K, distortion, and stereo extrinsics; rectification matrices derived from them.

Stereo Cheat Sheet

Geometry
  • Z = fB/d
  • Rectify
Match
  • Cost + smooth
  • SGM
Issues
  • Textureless
  • Occlusion

💡 Pro tip: Rectify first so disparity is a 1D search per row.

Full tutorial track

Go deeper with the matching tutorial chapter and code examples.