Two cameras, one point
Two cameras with centers and look at the same scene. A 3D point appears in image 0 at and in image 1 at . The construction is symmetric, and all its parts lie in one plane, the epipolar plane through , and :
- The baseline is the line through the two camera centers. It lies in every epipolar plane.
- The epipoles and are where the baseline meets the image planes. is the image of in camera 0, and is the image of in camera 1.
- The epipolar lines and are where the epipolar plane cuts the image planes. They contain and and the epipoles.
Every point has its own epipolar plane, but they all contain the baseline: they rotate about it like the pages of a book. So all epipolar lines of an image pass through its epipole, and together they form a pencil of lines.
Why the match has to lie on a line
The camera center is the right null space of the projection matrix, . If is on the ray through , so is every point , and they all project to the same pixel:
A pixel therefore only tells us the ray from through , not where is on it. Camera 1 sees this ray from the side, as a line: the epipolar line . Whatever depth has, lies on , so the search for the corresponding point shrinks from the whole image to a line. Once it is found, the two rays can be intersected, which gives the depth of .
Backprojection with the pseudo-inverse
is a 3 × 4 matrix and has no inverse, but its pseudo-inverse gives a point with the same projection:
lies on the ray, and together with the camera center it defines it: the ray is .
The fundamental matrix
Project both points of the ray into camera 1. goes to the epipole , and goes to . In homogeneous coordinates the line through two points is their cross product, and the cross product with is a matrix product with the anti-symmetric matrix :
(here are the three components of one epipole). The fundamental matrix is a linear map from points in image 0 to lines in image 1, and it contains the intrinsic and extrinsic parameters of both cameras. Since lies on :
This is the epipolar constraint. It holds for every pair of corresponding points, and it involves only pixels and , not the 3D point. That is what makes it possible to estimate from correspondences alone, with the 8-point algorithm.
is singular
has rank 2, because . So has rank 2 too, and . Geometrically, maps a 2D family of points to a 1D family of lines, the pencil through : every line contains , i.e. . The epipole itself has no epipolar line, : the ray through is the baseline, which camera 1 sees as the single point . Like every homogeneous matrix, is only defined up to scale; the panel scales it to .
Special camera arrangements
If the cameras have the same orientation and are only shifted sideways, the baseline is parallel to both image planes. The epipoles move to infinity, and the epipolar lines become parallel and horizontal: a match is on the same image row. Stereo systems aim for exactly this, and rectification warps the images of any two cameras so that the epipolar lines become parallel to the image rows. If camera 1 moves straight forward, the epipole lies in the image, at the point that all epipolar lines radiate from: the focus of expansion of the motion.
Try this
- Change the depth of : the point slides along , while stays put. The whole ray is one line in image 1.
- Turn on lines of all corners: all epipolar lines of an image meet in its epipole, the image of the other camera center.
- Click different points in image 0 and watch the epipolar plane in the 3D view turn about the baseline.
- Choose Parallel: the epipoles are at infinity, and every epipolar line is the row of its point. Set up to 0.5 m: the lines tilt but stay parallel, because the baseline is still parallel to the image planes. Set forward to 0.3 m instead: now they meet, far outside the image.
- Choose Forward motion: both epipoles are at the principal point, and the epipolar lines fan out from the center of the image.
- Change : the epipolar lines in image 1 scale about the principal point, and changes, but the epipolar plane in 3D stays the same.
- Move camera 1 until its center appears inside image 0: the epipole marks exactly where camera 1 is.