\[\begin{pmatrix}
a _ {11} & a _ {12} & a _ {13} \\
a _ {21} & a _ {22} & a _ {23} \\
0 & 0 & 1
\end{pmatrix}^{-1} \begin{pmatrix}
x \\
y \\
1
\end{pmatrix}\]
A transformation of 2D homogeneous coordinates $p$ of the form
\[H\begin{pmatrix}x \\ y \\ z \end{pmatrix} = \begin{pmatrix}
h _ {11} & h _ {12} & h _ {13} \\
h _ {21} & h _ {22} & h _ {23} \\
h _ {31} & h _ {32} & h _ {33}
\end{pmatrix}\begin{pmatrix}x \\ y \\ z \end{pmatrix}\]
(since these coordinates are actually elements of an equivalence class, the matrix is only defined up to scale, so a homography has $8$ degrees of freedom rather than $9$. Some references rescale to fix $h _ {33} = 1$, but this fails when the true $h _ {33} = 0$, so it is cleaner to keep $h _ {33}$ symbolic and impose $\|H\| _ F = 1$ instead).
How many point-to-point correspondences are required to determine a homography?
\[a \times b
=
\begin{pmatrix}
a _ 2 b _ 3 - a _ 3 b _ 2 \\
a _ 3 b _ 1 - a _ 1 b _ 3 \\
a _ 1 b _ 2 - a _ 2 b _ 1
\end{pmatrix}
=
\begin{bmatrix}
0 & -a _ 3 & a _ 2 \\
a _ 3 & 0 & -a _ 1 \\
-a _ 2 & a _ 1 & 0
\end{bmatrix} \begin{pmatrix}
b _ 1 \\
b _ 2 \\
b _ 3
\end{pmatrix}
:=
[a _ \times] b\]
Geometric meaning: $a \times b$ is perpendicular to both $a$ and $b$, with magnitude $ \vert a \vert \, \vert b \vert \,\sin\theta$, equal to the area of the parallelogram spanned by $a$ and $b$.
In homogeneous coordinates, @define $u \cong v$ for two vectors $u, v$.
$u, v$ are equal up to a non-zero scalar multiple.
Bite-sized
In homogeneous coordinates, a point with last coordinate $z = 0$ — for example $(x, y, 0)^\top$ — represents a point at infinity in the direction $(x, y)$. These are the “ideal points” that compactify the affine plane into the projective plane.
Source: Lecture 5, Homogeneous Coordinates II slide.
A homography has 8 degrees of freedom (a $3 \times 3$ matrix has 9 entries but is only defined up to scale). An affine transformation has 6 degrees of freedom (top two rows of a $3 \times 3$ matrix with last row $(0, 0, 1)$).
Source: Lecture 5, Homography - Degrees of Freedom and Homography as a Matrix slides.
An affine map has the form $A \pmb x + \pmb t$ for some linear $A$ and translation $\pmb t$. Linear maps preserve linear combinations, and a translation acts uniformly on all points, so two parallel lines $\ell _ 1, \ell _ 2$ are sent to two lines that remain parallel.
A homography includes a perspective component (the bottom row of $H$ is not $(0, 0, 1)$). This causes points at infinity to map to finite points: the vanishing point. Concretely, two lines parallel in the source plane meet at the same point at infinity, but the homography sends that point to a finite vanishing point in the target — so the lines now intersect there. Hence parallelism is not preserved.
What is preserved by a general homography: collinearity, incidence, and the cross-ratio of four collinear points.
Forward warp $T(x, y) = (x', y')$: iterate over each source pixel and write it into the target at $(x', y')$. Two problems:
Holes: many target pixels are never written (since $T$ may not map any integer source to them).
Pile-ups: several source pixels can map to the same target — need to handle collisions.
Backward warp $T^{-1}(x', y') = (x, y)$: iterate over each target pixel and look up its colour from the source. Every target pixel is written exactly once, no holes, no collisions. If the source coordinates are non-integer, interpolate (bilinear, bicubic, etc.).
The backward formulation is just an inverse-and-iterate, and it removes both of the forward-warp pathologies in a single move.
Source Lecture 2, Forward Warps and Backward Warps slides.
A homogeneous linear system $A \pmb p = \pmb 0$ subject to $ \Vert \pmb p \Vert = 1$ is solved by taking $\pmb p$ to be the right singular vector of $A$ corresponding to its smallest singular value — equivalently the eigenvector of $A^\top A$ with the smallest eigenvalue. This is the SVD trick used to solve for the homography matrix, the fundamental matrix, and the camera projection matrix.
Source: Lecture 5, Homogeneous Linear System slide.
In homogeneous coordinates, each affine transformation is a $3 \times 3$ matrix with bottom row $(0, 0, 1)$. The set of such matrices is closed under matrix multiplication — so composing two affine maps gives another affine map, and we just multiply their matrices.
Ordering: matrix multiplication is non-commutative. For a point $\pmb x$ expressed as a column vector, transformations are applied right-to-left: $R T \pmb x$ means “first translate by $T$, then rotate by $R$”. The example from the lecture:
To convert from homogeneous coordinates $(x, y, w)^\top$ back to Euclidean 2D coordinates, divide by the last entry: $(x/w, y/w)$. This is the projection step in $\mathbb R^3 \to \mathbb R^2$ that gives perspective projection its $1/z$ depth dependence.
Source: Lecture 14, Homogeneous Coordinates III slide.
A line $\ell^\top \pmb x = 0$ in 2D homogeneous coordinates passes through two points $\pmb p_1, \pmb p_2$ iff $\ell$ is perpendicular to both — i.e. $\ell = \class{cloze}{\pmb p_1 \times \pmb p_2}$. Dually, the intersection of two lines $\ell_1, \ell_2$ is the point $\pmb p = \ell_1 \times \ell_2$. This point-line duality via cross-product is the workhorse identity for projective geometry computations.