Epipolar Geometry
While stereo vision assumes rectified, calibrated cameras, epipolar geometry describes the relationship between any two camera views of the same scene, without rectification.
Let be a 3D point that projects to in image 1 and in image 2. The two camera centers and define an epipolar plane. Its intersections with the image planes are the epipolar lines and . For every point in one image, its corresponding point must lie along . This is the epipolar constraint:
where is the fundamental matrix, which encapsulates the relative orientation and position of two uncalibrated cameras. has rank 2 and 7 degrees of freedom (3×3 up to scale, minus the constraint).When both cameras are calibrated with intrinsics , , the essential matrix
captures the metric relative pose: rotation and translation direction (up to scale). Here is the skew-symmetric matrix encoding the cross product with . The essential matrix has 5 degrees of freedom and satisfies the essential constraint: its singular values are .The epipoles , are the projections of each camera center into the other’s image. All epipolar lines pass through these two points.
Given feature correspondences , is recovered by the 8-point algorithm: stack the linear constraints into and take the right singular vector of corresponding to the smallest singular value. Enforcing afterwards by zeroing the smallest singular value of the recovered gives the final estimate.
Intuition
The central question two-view geometry answers is: given a pixel in one image, where can its matching pixel in the other image possibly be? Without any assumptions, the answer is “anywhere.” But the moment we fix the two camera positions, the 3D point that produced the pixel must lie on a single ray — and that ray, reprojected into the second image, becomes a single line: the epipolar line. Searching for a correspondence thus reduces from a 2D search over all pixels to a 1D search along a line.
The fundamental matrix compactly encodes this constraint for every pair of pixels at once. Multiply the pixel in image 1 by and you get the epipolar line in image 2. Because is determined by the geometry of the two cameras, recovering it from a handful of point correspondences effectively tells you how the cameras are positioned relative to one another — up to a projective ambiguity when the cameras are uncalibrated, and up to a sign and scale when they are calibrated.
Properties
Fundamental vs. Essential
(Fundamental matrix — uncalibrated) relates pixels directly: . Rank 2, 7 DoF.
requires no calibration knowledge and is recovered from pixel correspondences. It contains the epipolar geometry but not metric information — it cannot distinguish “small scene, close cameras” from “large scene, distant cameras” unless intrinsics are known.
(Essential matrix — calibrated) relates normalized image coordinates (): . Rank 2, 5 DoF.
factors as and encodes metric relative pose. The translation is recovered only up to scale because is itself defined up to scale ( gives the same constraint).
(Essential constraint) The singular values of are — two equal nonzero singular values and one zero.
This follows from the factorization : the rank is 2, and the nonzero singular values equal . Any matrix with this SVD structure is an essential matrix, and vice versa.
(Relation to intrinsics) ; equivalently, .
Calibrating each view’s pixels to normalized coordinates converts the pixel-space epipolar constraint into the calibrated-space one. Knowing is what elevates to .
Epipoles and Epipolar Lines
(Epipoles) The epipole in image 1 is the projection of camera 2’s center, and satisfies ; analogously .
Algebraically, the epipoles are the left and right null-vectors of , reflecting its rank-2 structure. Geometrically, they are the vanishing points of the baseline direction in each image.
(Epipolar lines) Given in image 1, the corresponding epipolar line in image 2 is ; given in image 2, the line in image 1 is .
All epipolar lines in one image pass through that image’s epipole. A point’s corresponding match must lie on its epipolar line.
Recovery Algorithms
(Eight-point algorithm for ) Stack correspondences into and take the smallest right singular vector of , then enforce by SVD thresholding.
Each correspondence contributes one linear row where and . After solving for , its SVD is modified by setting ; the projection onto the rank-2 cone gives the final .
(Hartley normalization) Before the linear solve, translate and scale each image’s coordinates so that the centroid is at the origin and the mean distance is .
This preconditioning step reduces the linear system’s condition number by orders of magnitude and is essential for numerical stability of the 8-point algorithm. Without it, pixel coordinates in the thousands make the matrix catastrophically ill-conditioned.
(Five-point algorithm for ) Uses 5 correspondences and the essential-constraint polynomial system to recover up to 10 candidate essential matrices.
Faster inside RANSAC than the 8-point method (smaller minimal sample). Disambiguation among the up-to-10 candidates is done by checking the sign of the recovered depth on the available points.
Pose Recovery from
(Four-fold ambiguity) Decomposing yields four candidate pairs.
The four come from two rotation candidates ( and where is a fixed -rotation matrix) and two sign choices for (the third column of , ). Three of the four candidates place at least one triangulated point behind one of the cameras; the single candidate with all points in front of both cameras (positive depth, a chirality check) is the true pose.
(Scale ambiguity) The translation recovered from is only known up to sign and magnitude.
for any gives the same epipolar constraint; equivalently, doubling all 3D distances while halving all focal lengths is observationally equivalent. Metric scale requires external information: a known baseline (stereo rig), a known object size, or inertial data.
Practical Use
(Inside RANSAC) Both and are estimated robustly using RANSAC because feature matches contain many outliers.
Minimal sample: 8 correspondences for (8-point), 5 for (5-point). Inlier test: symmetric point-to-epipolar-line distance .
(Degenerate configurations) Pure rotation and planar scenes make (or ) unrecoverable.
Under pure rotation there is no baseline, epipolar geometry collapses, and only a homography relates the views. For a planar scene, any linear combination of the plane’s homography and a rank-1 term satisfies the epipolar constraint — is not unique. These cases must be detected (e.g., by testing whether a homography explains the matches equally well) and handled with alternative estimators.
Examples
8-point Algorithm, End to End
Given 8 pixel correspondences :
- Normalize: apply Hartley’s similarity transform so each point cloud has centroid 0 and mean distance .
- Build with rows from the normalized points.
- Solve : take the right singular vector of corresponding to the smallest singular value; reshape into .
- Enforce rank 2: SVD , set , recompose.
- Denormalize: .
The recovered satisfies for each correspondence, with residuals on the order of the pixel noise.
See Also
- 5.1. The Pinhole Camera — the per-camera projection model
- 5.2. Stereo Geometry — the rectified, calibrated, known-baseline special case
- 4.4.1. RANSAC — the robust estimation wrapper applied to the 8-point / 5-point algorithms
- SfM — the multi-view extension
- 3.4. Homographies — the alternative model that replaces for planar scenes or pure rotation