Conceptcore
Epipolar geometry
Also called epipolar constraint, two-view geometry.
The geometry of two views of one scene. A point in one image must have its match on a line in the other image, and all these lines pass through the image of the other camera center.
Epipolar geometry is the geometry of two images of one scene taken by two pinhole cameras at different places. It depends only on the two cameras, their internal parameters and their relative pose, and not on the scene. Its main result is the epipolar constraint: if and are images of the same 3D point, then lies on a line in image 2 that fixes, and the other way round. In matrices the constraint is for the fundamental matrix in pixel coordinates, and for the essential matrix in normalized coordinates. This page is about the geometry; the two matrices have their own pages, and the methods that find them from matches are the eight-point, seven-point and five-point algorithms.
In plain words
Two cameras look at the same scene from two places. Pick a point in the first image. The point in space that made it lies somewhere on the ray from the first camera through that image point, but the image alone does not say how far along the ray. Seen from the second camera, that ray is a line. So the matching point in the second image must be on that line, and a search for the match can look along one line instead of over the whole image. Every such line in the second image passes through one special point: the place where the second camera sees the first camera. The same holds the other way round. The positions of these lines depend only on how the two cameras are placed, not on what they look at.
The idea
Setup. We use the conventions of this area. Camera 1 has the frame , camera 2 has the frame , and the relative pose maps one to the other: . Both frames have forward. The camera matrices are and , with the intrinsic matrices and . Image points are homogeneous 3-vectors, and the normalized image point of a pixel is . The center of camera 1 is in frame 1, and the center of camera 2 is in frame 1.
The named objects.
- The baseline is the line through the two centers and .
- An epipolar plane is a plane that contains the baseline. Each 3D point off the baseline lies on exactly one epipolar plane, together with the two centers.
- The epipole is the image of in camera 1, and is the image of in camera 2. Both are the points where the baseline meets the image planes. An epipole can be at infinity (when the baseline is parallel to the image plane) and can be the image of a center behind the camera.
- An epipolar line is the intersection of an epipolar plane with an image plane. In image 2, the epipolar line of is the image of the ray of . All epipolar lines of one image pass through its epipole.
The constraint. Let be a point with and . The three vectors , and , all written in frame 2, lie in one plane (the epipolar plane), so
where is the skew matrix of . The matrix is the essential matrix. With the same equation in pixels is with . This is the form of Longuet-Higgins (1981) for , and of Hartley and Zisserman (Section 9.2) for .
Lines and epipoles in matrix form. For a fixed , the equation says that lies on the line . In the same way the epipolar line of in image 1 is . The epipoles are the null vectors: and . Since for all , every line passes through . is singular because it has a null vector; it has rank 2 whenever the centers differ.
The two pencils. The epipolar lines of an image form a pencil, the set of lines through the epipole, which is a projective line. The epipolar planes give a one-to-one map between the pencil of image 1 and the pencil of image 2: an epipolar line in one image matches exactly one in the other. This map is a 1D homography with 3 degrees of freedom, and with the 2 + 2 coordinates of the two epipoles it gives the 7 degrees of freedom of (Hartley and Zisserman, Section 9.2).
What it does not fix. The constraint is one equation per match. It says that a match is possible, not that it is right: a wrong match that falls on the epipolar line passes. It also does not see the scale of : and give the same constraint, so from two images alone the baseline is known only in direction. Points on the baseline have no epipolar plane, and their images are the epipoles.
Special motions.
- Pure rotation, : the centers coincide, , and there is no epipolar geometry. The two images are related by the homography .
- Translation along the optical axis, and : the epipole is the principal point, and the epipolar lines are the lines through it. The image points move along these lines, away from or toward the epipole.
- Sideways translation, , and : the epipoles are the point at infinity , and the epipolar lines are the image rows. This is the rectified case.
- A planar scene: the matches also satisfy a homography. The epipolar geometry is still defined by the cameras, but the matches cannot fix it, because many matrices fit them. See the degenerate cases on the eight-point page.
Examples
A rotation about the Y axis and a sideways step. Let (normalized coordinates), , a rotation by about degrees about , and . Then
- Epipoles. , so . This is the image of , which has : camera 2 is behind camera 1, and the epipole is the image of a point behind the camera. , so , a point at infinity: is at , with . So the epipolar lines in image 2 are parallel, and all are horizontal.
- A match. The point gives , so and . The line is , and lies on it. The depths are 5 in camera 1 and 4 in camera 2.
- A second match. gives , and . The line is ; it contains . The other way, . It passes through , since , and through , since .
The same cameras in pixels. With , the first match becomes and the second . The fundamental matrix page computes for this case.
The rectified pair. With , with focal length and zero skew, and camera 2 at , we get , and
The constraint is for the second form: a match is on the same row. This is why stereo rectification maps both images so that takes this form, and the search for a match becomes a search for the disparity along a row.
Where it is used
- Matching. The search for the match of a point runs along its epipolar line, often in a band of a few pixels around it. This cuts a 2D search to a 1D search and removes many wrong matches. Dense stereo matching works on rectified images, where the lines are rows.
- Relative pose. The relative pose problem finds from the constraint on many matches, with the five-point algorithm for calibrated cameras or the eight-point and seven-point algorithms for . Then pose recovery from E and cheirality give the motion.
- Outlier rejection. In RANSAC, a match is an inlier when it is close to its epipolar line. The Sampson distance is the usual first-order measure of that distance.
- Triangulation. A match that satisfies the constraint exactly has two rays that meet. Optimal triangulation moves a noisy match to the nearest pair that satisfies it, and linear triangulation intersects the rays.
- Structure from motion and visual odometry. Two-view geometry starts incremental structure from motion and is the core of visual odometry front ends. Three views add the trifocal tensor, which also transfers lines.
References
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Chapter 9, Epipolar Geometry and the Fundamental Matrix: Section 9.1 (epipolar geometry) and Section 9.2 (the fundamental matrix, its derivation and properties)
- Yi Ma, Stefano Soatto, Jana Kosecka and S. Shankar Sastry, An Invitation to 3-D Vision, Springer, 2004, Chapter 5, Section 5.1.1 (the epipolar constraint and the essential matrix)
- H. C. Longuet-Higgins, A computer algorithm for reconstructing a scene from two projections, Nature 293, 1981, 133-135, the coplanarity constraint between the two rays and the baseline, written as a bilinear form in the image coordinates
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Section 11.3, Two-frame structure from motion
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 2AW6EF Edit this page History Report an error Markdown