Find Epipole from Fundamental Matrix
Find the epipole as the intersection of epipolar lines.
The epipole is the point where all epipolar lines converge - it's the projection of one camera's center onto the other camera's image plane. Mathematically, the epipole e satisfies:
Fβ e=0
This means e is in the null space of F.
A practical approach is to find two epipolar lines (from different source points) and compute their intersection using the cross product:
e=l1βΓl2β
If the epipole is at infinity (parallel cameras), it indicates pure translation.
Example:
find_epipole([[0,0,-1],[0,0,0],[1,0,0]])
[0, 0]
Finding epipole from F:
- Get epipolar line for point (0,0): l1 = F Γ [0,0,1] = [-1, 0, 0]
- Get epipolar line for point (1,0): l2 = F Γ [1,0,1] = [0, 0, 1]
- Cross product l1 Γ l2 gives intersection in homogeneous coords
- Convert to Cartesian: epipole = [0, 0] This represents camera center projection at image origin.
Constraints:
- F: 3x3 fundamental matrix
- Return epipole [x, y] or None if at infinity
The core idea is: the epipole in an image is the unique point where all epipolar lines from that camera intersect; algebraically it is a null-space vector of the fundamental matrix F (right epipole) or Fβ€ (left epipole). In homogeneous 2D coordinates, lines are 3D vectors and their intersection is a cross product.
1. Background Knowledge
In stereo vision, two cameras view the same 3D scene. Any 3D point projects to a pair of image points \mathbf{x} and \mathbf{x}β². These pairs are constrained by the fundamental matrix F, which encodes the epipolar geometry between the two views. The fundamental relation is:
xβ²β€Fx=0For a fixed point \mathbf{x} in the first image, the set of all possible matches \mathbf{x}β² in the second image lie on a line
lβ²=Fxcalled the epipolar line.
The epipole is the projection of one camera center into the other cameraβs image plane. All epipolar lines in an image pass through that epipole, so the epipole is the intersection point of all epipolar lines in that image. Algebraically, the right-image epipole eβ² satisfies:
Feβ²=0and the left-image epipole e satisfies:
Fβ€e=0i.e., each epipole is a (right or left) null-space vector of F.
2. Algorithm / Approach Pattern
Two equivalent patterns you should understand:
- Null-space approach (most robust):
- The epipole is any non-zero vector in the null space of F (or Fβ€ depending on which epipole you want).
- Compute this using SVD or eigen-decomposition.
- Line-intersection approach (geometric):
- Pick two (or more) points in one image.
- Map them to epipolar lines in the other image: liβ=F\mathbf{x}iβ (or liβ²β=Fβ€\mathbf{x}iβ²β).
- Compute the intersection of two epipolar lines:
- With more than two lines, you can make the estimate more robust (e.g., least squares).
For coding problems like this, the simplest and numerically stable pattern is SVD-based null-space extraction, but understanding the line-intersection via cross product connects the algebra to the geometry.
3. Step-by-Step Strategy
Assuming you are given a 3Γ3 fundamental matrix F and asked for, say, the epipole in the right image:
A. Using null space (recommended)
- Compute SVD of F:
- F=UΞ£Vβ€
- In most libraries: U, S, Vt = np.linalg.svd(F).
- Get the right epipole eβ²:
- The right null-space is the last column of V (or last row of Vt).
- Let eβ²=V[:,β1] (or Vt[-1, :] transposed).
Continue the full explanation
You're reading the free preview. Unlock the complete walkthrough, the code editor, test runner and reference solution with Premium.
Editor locked
The code editor is locked for Pro problems. It is only available for free problems. Please upgrade to gain access to the code editor for all problems.