Homographic Transformations

Homogeneous coordinates (Section 1.5) allow a wide range of transformations to be represented within a single formalism, unifying linear and affine transformations, such as rotations, translations, and scalings, with projective transformations.

A homographic transformation is a one-to-one correspondence between two projective planes that preserves incidence relations between points and lines.

Given two distinct planes $\Pi_i$ and $\Pi_j$, they are said to be related by a homographic transformation (homographic transformation) if there is a one-to-one correspondence between their points that preserves incidence relations between points and lines. In particular, each point in $\Pi_i$ corresponds to exactly one point in $\Pi_j$, and each line in $\Pi_i$ corresponds to exactly one line in $\Pi_j$.

Suppose the plane $\Pi$ is observed from two different viewpoints. In the space $\mathbb{R}^{2}$, the homography (homographic transformation) is represented by equations of the form:

\begin{displaymath}
\begin{array}{l}
u_j = \dfrac{h_0 u_i + h_1 v_i + h_2}{h_6 ...
...c{h_3 u_i + h_4 v_i + h_5}{h_6 u_i + h_7 v_i + h_8}
\end{array}\end{displaymath} (1.111)

where $(u_i,v_i)$ are the coordinates of points in the projection of plane $\Pi$ in image $i$, while $(u_j,v_j)$ are the coordinates of the projections of the same points in image $j$.

Because of its particular form, this transformation can be described as a linear transformation using homogeneous coordinates (Section 1.5):

\begin{displaymath}
\begin{bmatrix}
u_j \\ v_j \\ 1
\end{bmatrix}\sim
\mathbf{H}^{\Pi}_{ij}
\begin{bmatrix}
u_i \\ v_i \\ 1
\end{bmatrix}\end{displaymath} (1.112)

where
\begin{displaymath}
\mathbf{H}^{\Pi}_{ij} =
\begin{bmatrix}
h_0 & h_1 & h_2 \\
h_3 & h_4 & h_5 \\
h_6 & h_7 & h_8 \\
\end{bmatrix}.
\end{displaymath} (1.113)

has been defined. In the space $\mathbb{R}^{2}$, homographies are represented by matrices $3 \times 3$ (2D homographies); homographic transformations can likewise be defined for higher-dimensional spaces. For compactness, and to retain the convention of a row-major in-memory representation, as in C, matrix $\mathbf{H}^{\Pi}_{ij}$ is expressed using coefficients $h_0 \ldots h_8$ rather than the standard notation for specifying matrix elements.

A homography matrix $\mathbf{H}^{\Pi}_{ij}$ is defined as the matrix that maps homogeneous points $\mathbf{x}_i$ in the projection of plane $\Pi$ in image $i$ to homogeneous points $\mathbf{x}_j$ in image $j$ according to the relation

\begin{displaymath}
\mathbf{x}_j \sim \mathbf{H}^{\Pi}_{ij} \mathbf{x}_i.
\end{displaymath} (1.114)

Since this is a relation between homogeneous quantities, the system is defined up to a multiplicative factor: any nonzero multiple of the homography matrix parameters defines the same transformation, since homogeneous coordinates are themselves defined up to a scale factor. Consequently, the problem has 8 rather than 9 degrees of freedom, because an additional constraint can always be imposed on the matrix elements. Commonly used constraints include $h_8 = 1$ or $\Vert \mathbf{H} \Vert _{F}=1$. Note that $h_8 = 1$ is generally not an optimal constraint from a computational perspective, because the magnitude of $h_8$ can be very different from that of the other matrix elements. Moreover, if $h_8=0$, this normalization is not possible.

The alternative constraint $\Vert \mathbf{H} \Vert _{F}=1$ does not privilege any particular matrix element and is especially natural when the parameters are computed using factorizations such as SVD. Indeed, denoting the homography parameter vector by $\mathbf{h} = (h_0,\ldots,h_8)^{\top}$, each point-to-point correspondence provides constraints on the coefficients of $\mathbf{h}$. As will be shown in detail in Section 9.5.1, these constraints can be assembled into a homogeneous linear system of the form $\mathbf{A}\mathbf{h}=0$. Since the zero solution is not meaningful, a normalization constraint must be imposed—for example, $\Vert\mathbf{h}\Vert=1$—reducing the problem to the homogeneous linear systems discussed in Section 1.1. In the presence of noise, the solution is obtained by selecting the right singular vector associated with the smallest singular value of matrix $\mathbf{A}$.

Figure 1.6: Example of a homographic transformation: the homography relates planes in perspective to planes without perspective.

Image fig_homography

Figure 1.7: Example of a homographic transformation: the homography relates “virtual” planes to one another.
Image fig_homography2

Homographic transformations have many applications. These will be discussed in detail in Chapter 9 on the pinhole camera. In brief, such transformations allow perspective to be removed from planar image regions, planes to be projected in perspective, and points on planes observed from different viewpoints to be matched. One way to obtain projective transformations is to establish correspondences between points on the planes to be transformed and use them to determine the homography matrix parameters (1.111), including in an overdetermined system, for example by using least squares. One method for finding the coefficients is shown in Equation (9.59). Recall that this transformation, which relates points on a plane across two perspective views, applies only to points on the plane in question: the homography relates points on a plane to one another, and only those points. Any point not on the plane will be reprojected to an incorrect location.

Since a homographic transformation is represented by a nonsingular matrix, it is invertible, and its inverse is also a homographic transformation:

\begin{displaymath}
\left( \mathbf{H}^{\Pi}_{ij} \right)^{-1} = \mathbf{H}^{\Pi}_{ji}.
\end{displaymath} (1.115)

One possible form of the inverse of homography (1.111) is

\begin{displaymath}
\begin{array}{l}
u_i = \dfrac{(h_5 h_7 - h_4 h_8)u_j + (h_1...
...u_j + (h_1 h_6 - h_0 h_7) v_j + h_3 h_1 - h_0 h_4 }
\end{array}\end{displaymath} (1.116)

and, since it is known up to a multiplicative factor, the inverse matrix does not need to be normalized by its determinant (the unnormalized inverse homographic matrix).

Note that when a homography does not introduce a projective component, that is, when $h_6=0 \wedge h_7=0$, the homographic transformation reduces to an affine transformation (affine transformation) represented by the standard equations

\begin{displaymath}
\begin{array}{l}
u_j = h_0 u_i + h_1 v_i + h_2 \\
v_j = h_3 u_i + h_4 v_i + h_5
\end{array}\end{displaymath} (1.117)

introduced earlier.



Subsections
Paolo medici
2026-10-19