Subsections

MLE Computation of the Homography

From a computational perspective, equation (9.58) is ill-conditioned, since each column represents a quantity with a different order of magnitude. A normalization step is therefore required beforehand to obtain a correct linear solution. Hartley and Zisserman (HZ04) emphasize that normalization is an essential step in DLT and should not be considered optional.

However, computing the homography in equation (9.59) has the drawback that it does not account for measurement error in the points. In fact, the SVD minimizes a quantity that happens, purely by chance, to resemble the error in the right-hand side (which is not minimized at all in case (9.58)); in any case, the error in the parameter matrix cannot be evaluated. In this specific case, where least squares minimizes a purely mathematical error with no corresponding geometric interpretation, the method is called algebraic least squares (ALS).

Since DLT minimizes algebraic rather than geometric error, normalized DLT, although computationally better, may produce a worse geometric fit to the data. The normalized least-squares version of system (9.58) is called normalized algebraic least squares (NALS).

To overcome the limitation of minimizing algebraic error, it is necessary to return to the original problem rather than transform it into a linear one, and solve it, for example, iteratively using a nonlinear optimizer.

If noise is present in only one of the two images, an appropriate cost function with a geometric interpretation is the Euclidean distance between the measured points and the transformed points. This is commonly called the transfer error and leads to minimization of the nonlinear cost function

\begin{displaymath}
\argmin_\mathbf{H} \sum \Vert \mathbf{m}'_i - \mathbf{H} \mathbf{m}_i \Vert^2.
\end{displaymath} (9.64)

where $\mathbf{m}'_i$ is the image point affected by white Gaussian noise, while point $\mathbf{m}_i$ is assumed to be known without error.

Furthermore, assuming zero-mean isotropic Gaussian noise on the image points, minimizing the transfer error is equivalent to finding the maximum-likelihood estimator (Maximum Likelihood Estimator, MLE).

However, when both data points are affected by noise, cost function (9.64) is not optimal. The simplest way to extend the previous solution is to minimize both the forward and inverse transfer errors (symmetric transfer error):

\begin{displaymath}
\argmin_\mathbf{H} \sum \Vert \mathbf{m}'_i - \mathbf{H} \m...
... + \Vert \mathbf{m}_i - \mathbf{H}^{-1} \mathbf{m}'_i \Vert^2
\end{displaymath} (9.65)

This accounts for both the forward and inverse transfer errors.

However, this is still not the optimal solution, at least from a statistical perspective. A maximum-likelihood estimator must correctly account for noise in both data points when present (what Hartley and Zisserman call the Gold Standard). The alternative—and more accurate—solution is to minimize the reprojection error.

This solution greatly increases the problem's dimensionality, since it also aims to identify the optimal, noise-free points $\hat{\mathbf{m}}_i$ and $\hat{\mathbf{m}}'_i$ (or requires them among the unknowns):

\begin{displaymath}
\argmin_\mathbf{H} \sum \Vert \mathbf{m}'_i - \hat{\mathbf{m}}'_i \Vert^2 + \Vert \mathbf{m}_i - \hat{\mathbf{m}}_i \Vert^2
\end{displaymath} (9.66)

subject to the constraint $\hat{\mathbf{m}'}_i = \mathbf{H} \hat{\mathbf{m}}_i$.

In the more general case where the noise covariance is measured for each individual point, the correct metric is the Mahalanobis distance (see Section 2.4):

\begin{displaymath}
\Vert \mathbf{m} - \hat{\mathbf{m}} \Vert^{2}_{\Gamma} = (\...
...athbf{m}})^{\top} \Gamma^{-1} (\mathbf{m} - \hat{\mathbf{m}})
\end{displaymath} (9.67)

If the noise is constant across points, the expression above reduces to the more intuitive Euclidean distance.

Since this is a nonlinear minimization, an initial solution is required to find the minimum that satisfies the cost equation. The linear solution remains useful as an initial estimate for finding a minimum under a different metric.

The MLE requires one additional auxiliary variable $\hat{\mathbf{m}}_i$ for each point, as well as iterative techniques to solve the problem. The Sampson error, described in Section 4.3.8, can be used as an approximation to the geometric distance. The homography constraint (1.111) relating points in the two images can be written as a two-dimensional manifold $\mathcal{V}_H$:

\begin{displaymath}
\begin{array}{l}
h_0 u_1 + h_1 v_1 + h_2 - h_6 u_1 u_2 - h_...
...+ h_5 - h_6 u_1 v_2 - h_7 v_1 v_2 - h_8 v_2 = 0 \\
\end{array}\end{displaymath} (9.68)

which gives the Jacobian
\begin{displaymath}
\mathbf{J}_\mathcal{V} = \begin{bmatrix}
h_0 - h_6 u_2 & h_...
...& h_4 - h_7 v_2 & 0 & -h_6 u_1 -h_7 v_1 - h_8 \\
\end{bmatrix}\end{displaymath} (9.69)

to be used in computing the Sampson distance (CPS05).

Error Propagation in Homography Estimation

When there is error in only one image, calculating how the error propagates to the matrix $\mathbf{H}$ requires computing the Jacobian of the cost function (9.64). Expanding the homography transformation gives (HZ04)

\begin{displaymath}
\mathbf{J}_i = \frac{\partial r}{\partial \mathbf{h}} = \fra...
...& - \hat{v}'_i \mathbf{m}_i^{\top} / \hat{w}' \\
\end{bmatrix}\end{displaymath} (9.70)

with $\mathbf{m}_i = (u_i, v_i, 1)^{\top}$ and $\hat{\mathbf{m}}'_i = (\hat{u}'_i, \hat{v}'_i, \hat{w}'_i)^{\top} = \mathbf{H} \mathbf{m}_i$. Using the theory presented in Section 4.5, the covariance matrix of the homography parameters can be calculated from the point covariance $\mathbf{m}'_i$. Since the total covariance matrix $\boldsymbol\Sigma$ of the noise on the individual points is highly sparse, as the noise on different points is assumed to be independent, the covariance $\boldsymbol\Sigma_h$ of the estimated parameters is given by (HZ04)
\begin{displaymath}
\boldsymbol\Sigma_h = \left( \sum \mathbf{J}_i^{\top} \boldsymbol\Sigma^{-1}_i \mathbf{J}_i \right)^{+}
\end{displaymath} (9.71)

where $\boldsymbol\Sigma_i$ is the covariance matrix of the noise on an individual point.

Paolo medici
2026-10-19