Skip to content
AI360XpertBeta
Computer Vision

Visual explainer

Epipolar Geometry

How two views shrink your match hunt to one line.

1. Find The Same Point

A point in one image can have many lookalikes in the other.
A point in one image can have many lookalikes in the other.

Epipolar geometry uses the relationship between two cameras to restrict where a matching image point can lie. It reduces a two-dimensional search to a line. It does not decide which lookalike is correct.

2. Build The Shared Plane

Two camera centers and a scene point define an epipolar plane.
Two camera centers and a scene point define an epipolar plane.

Join the two camera centers to a visible scene point. Unless those three points are collinear, they define a plane. Where it cuts each image plane, it creates an epipolar line. Each projection lies on its corresponding line.

3. Test The Line Constraint

The epipolar constraint reduces matching to a line, not a unique point.
The epipolar constraint reduces matching to a line, not a unique point.

For this illustrative line, v = 0.5u + 20, both (40,40) and (120,80) fit; (120,40) does not. In general, the fundamental matrix maps a point to this line: l′ = Fx. Measured matches need a tolerance around it.

4. Find The Epipole

Epipolar lines meet at the image of the other camera center.
Epipolar lines meet at the image of the other camera center.

The epipole is the other camera center projected into this image. All epipolar lines pass through it. It can lie outside the image or at infinity. OpenCV's geometry explanation connects this point to the baseline.

5. Rectify The Images

Rectification warps images so matching points share a row.
Rectification warps images so matching points share a row.

Rectification transforms image coordinates so corresponding epipolar lines become aligned horizontal rows. It does not physically move the cameras. Searching along a row is simpler, but repeated texture and occlusion still make matching difficult.

6. Measure Disparity

Disparity is the horizontal coordinate difference between matched pixels.
Disparity is the horizontal coordinate difference between matched pixels.

Once a match is established, subtract its rectified coordinates: d = xL − xR. Our point appears at 100 on the left and 80 on the right, so disparity is 20 pixels. The rulers use the same origin and scale.

7. Recover Metric Depth

Calibrated rectified stereo turns disparity into depth with Z = fB/d.
Calibrated rectified stereo turns disparity into depth with Z = fB/d.

For a calibrated horizontal pair with aligned principal points, Z = fB/d. Here f = 800 px, baseline B = 0.1 m, and d = 20 px: Z = 800 × 0.1 / 20 = 4 m. Unknown baseline scale leaves depth scale unknown.

8. Inspect Depth Uncertainty

Small disparities make depth more sensitive to a one-pixel error.
Small disparities make depth more sensitive to a one-pixel error.

Keep fB = 80 px·m. Disparity 20 ± 1 gives roughly 3.81–4.21 m; 10 ± 1 gives 7.27–8.89 m. The same matching error has a larger depth effect farther away.

9. A Row Can Repeat

Repeated texture can leave several plausible matches on the same epipolar line.
Repeated texture can leave several plausible matches on the same epipolar line.

Several identical windows can all satisfy the geometry. Appearance descriptors, neighboring matches, and consistency checks help resolve ambiguity. An occluded point has no visible counterpart at all; forcing a match can produce a plausible but incorrect depth.

10. Where It Breaks

Pure camera rotation provides no baseline for triangulating depth.
Pure camera rotation provides no baseline for triangulating depth.

Rotating around one camera center changes the image without introducing a second viewing origin. There is no translational parallax to triangulate depth. Small baselines and nearly parallel rays also make reconstruction sensitive to error; more images help only when they add useful evidence.

The Quick Version

  • Epipolar geometry narrows matching from an image to a line.
  • Two centers and a non-collinear scene point define the plane.
  • A valid line constraint does not guarantee a correct match.
  • Epipolar lines meet at the other camera center's projection.
  • Rectification aligns corresponding search rows through image warps.
  • Disparity measures the horizontal coordinate difference between matched points.
  • Calibrated stereo with known baseline converts disparity into metric depth.
  • Small disparities amplify depth uncertainty.
  • Repeated texture and occlusion can defeat correspondence.
  • Pure rotation supplies no triangulation baseline.