Compute Epipolar Line
Given a fundamental matrix and a point in image 1, compute the corresponding epipolar line in image 2.
The epipolar line is computed as:
where represents the line in image 2.
Normalization: The line coefficients should be normalized so that:
This ensures the coefficients represent a proper line equation where gives the signed distance from the origin to the line.
Epipolar lines are fundamental in stereo vision -- they constrain where a corresponding point can appear in the second image, reducing the search from 2D to 1D.
Round each coefficient to 4 decimal places.
Example
F = [[0, 0, 0],
[0, 0, -1],
[0, 1, 0]]
x1 = [10, 20, 1][0.0, -1.0, 20.0]
Fis the fundamental matrix linking the two views;x1is pixel of image 1 in homogeneous form.- Each line coefficient is one row of dotted with : row 1 gives ; row 2 gives ; row 3 gives . So .
- Normalization factor: , so dividing , , by it changes nothing here. A raw line would shrink to the same .
- The output
[0.0, -1.0, 20.0]is the line , i.e. the horizontal row , at distance from the origin. - Notice it is the same row the point sits on in image 1: this describes a rectified side-by-side stereo pair, where matches lie on the same scanline.
Constraints
- F: 3x3 fundamental matrix as list of lists
- x1: Point in image 1 as [x, y, 1] (homogeneous coordinates)
- Return: Normalized line coefficients [a, b, c] as a list
- Normalize so that sqrt(a^2 + b^2) = 1
- Round to 4 decimal places