Fundamental matrix (computer vision) (source code)

= Fundamental matrix
{disambiguate=computer vision}
{title2=$F$}

The <fundamental matrix (computer vision)> $F$ encodes the <epipolar geometry> of two distinct <camera centers> using image <homogeneous coordinates>. For matching image points $x_L,x_R$, the ideal constraint is
$$
x_R^{\mathsf T}Fx_L=0.
$$
Thus $Fx_L$ is an <epipolar line> in the right image, while $F^{\mathsf T}x_R$ is an <epipolar line> in the left image. A nondegenerate <fundamental matrix (computer vision)> has <matrix rank> two and is defined only up to nonzero scale.<Epipolar Geometry in the OpenCV-Python tutorials>[Basic Concepts: correspondence constraint, rank-two matrix and point-to-line mapping]{ref}

For an ideal horizontally aligned stereo pair with matched image coordinate origins, one possible scale convention is
$$
F=\begin{pmatrix}0&0&0\\0&0&-1\\0&1&0\end{pmatrix}.
$$
Putting $x_L=(20,50,1)^{\mathsf T}$ gives $Fx_L=(0,-1,50)^{\mathsf T}$, so the right point must satisfy $v_R=50$. Its horizontal coordinate remains free: the constraint reduces the search to a line but does not determine <stereo disparity> or depth. Repeated texture can still make <stereo correspondence> ambiguous.

With <camera calibration> matrices $K_L,K_R$ and relative pose $(R,t)$ under the convention $X_R=RX_L+t$, the relation is $F=K_R^{-\mathsf T}[t]_\times RK_L^{-1}$, where $[t]_\times v=t\times v$. Translation direction affects the geometry, but multiplying $t$ by a scalar only rescales $F$: the <fundamental matrix (computer vision)> alone cannot establish a metric <camera baseline>. Pure rotation has $t=0$ and requires a different geometric description.<Epipolar Geometry in the OpenCV-Python tutorials>[Basic Concepts: essential and fundamental matrices, intrinsic calibration and degrees of freedom]{ref}