CSE445Computer Vision
ModulesMulti-View & MotionStereo & Triangulation

Stereo and Triangulation

Rectification, disparity, the Z = fB/d relation, linear triangulation, and depth uncertainty.

Key Terms

RectificationDisparityZ = fB/dLinear TriangulationDLTDepth Uncertainty

Python Tools

OpenCVNumPyOpen3DMatplotlib

Textbook Reference

Szeliski Ch.12Hartley & Zisserman Ch.10-12

Topics Covered

  1. 1Stereo rectification to horizontal epipolar lines
  2. 2Disparity from block matching and cost aggregation
  3. 3The depth-disparity relation Z = fB/d and its sensitivity
  4. 4Linear (DLT) triangulation and the midpoint method
  5. 5Propagating matching error to depth uncertainty

Learning Outcomes

  • Explain rectification and its effect on the correspondence search
  • Convert disparity to metric depth and analyze its error
  • Triangulate 3D points by DLT and assess their uncertainty

Step-by-step walkthrough · Stage 1 of 9

How stereo observations become a 3D point

Follow one calibrated pair from rectification and patch matching to disparity, metric depth, DLT triangulation, and uncertainty. Every number is computed from the same example. Use ← → keys or the buttons.

An oblique view of aligned cameras at minus and plus 0.4 metres on the X axis. Exact rays meet at the point (0.25, -0.2, 4) metres. The diagram uses virtual front image planes.RECTIFIED RIG · 3D OBLIQUE VIEWxLCLxRCRPZ = 4.00 mB = 0.80 mf = 520 px
Fixed calibration: B = 0.80 m · f = 520 px · cx = 320 px · cy = 200 px
step 1 / 27

Put both images in a common stereo geometry · Set the calibrated rig

The camera centers are 0.8 metres apart. After rectification, both virtual cameras look along +Z and share f = 520 pixels and principal point (320, 200).

3D reconstruction walkthrough

Depth Estimation & Introductory Structure from Motion

Three connected ideas, one step at a time: how two cameras turn a pixel shift into a distance, how two views triangulate a single point, and how many views recover structure and motion together.

Step 1 / 8
LEFT IMAGE
RIGHT IMAGE

Step 1 of 8 · Two cameras

Two cameras, one rigid offset

A rectified stereo rig is two identical cameras side by side, looking the same way. The distance between their centres is the baseline B — the only thing that makes depth recoverable at all.

B=∥CR−CL∥B = \lVert \mathbf{C}_R - \mathbf{C}_L \rVert

Look for

In the 3D view, the amber bar between Cᴸ and Cᴿ is the baseline.

xL

452.0 px

xR

360.1 px

disparity d

91.92 px

estimated Z

4.525 m

true Z

4.500 m

depth error

0.025 m

uncertainty ±

0.039 m

baseline B

0.80 m

Try it

cyan = viewing raysgreen = acceptedred = rejected / invalid

Lecture PDFs

Stereo and Triangulation

The embedded PDF preview is disabled to reduce Vercel bandwidth usage. Open the lecture file directly in Google Drive for viewing, downloading, or presenting.