Page 405 -
P. 405
Section 12.1 Registering Rigid Objects 373
FIGURE 12.3: An image of a mountain (top left) and local neighborhoods (bottom left)
that match those in the second view of the mountain (top center; local neighborhoods are
bottom center). These images may look as though they can be rectified by a translation,
but in fact this works poorly. Top right shows a (manually chosen) translation that
appears to work, with the left image superimposed on the center image. In fact, this
isn’t a particularly good registration, as one can see from the bottom right,where the
center image is now on top. A homography is required for a good registration; compare
Figure 12.4. This figure was originally published as Figure 1 M. Brown and D. Lowe,
“Recognizing Panoramas,” Proc. ICCV 2003, c IEEE, 2003.
in the unknown entries of the matrix for each pair of corresponding points, i.e.,
(i) (i) (i) (i) (i)
x (h 31 x 1 + h 32 y 1 + h 33 ) − (h 11 x 1 + h 12 y 1 + h 13 )= 0
2
(i) (i) (i) (i) (i)
y (h 31 x 1 + h 32 y 1 + h 33 ) − (h 21 x 1 + h 22 y 1 + h 23 )= 0.
2
This system admits a solution for H up to scale, which is all that is required
(we are working in homogeneous coordinates). This is a good way to get an estimate
of H for a small group of points, but might not lead to the most accurate solution
when we have a large set of corresponding points. In this case, we should minimize
as a function of H
(i) (i) (i) (i)
(i) h 11 x 1 + h 12 y 1 + h 13 2 (i) h 21 x 1 + h 22 y 1 + h 23 2
g (x 2 − (i) (i) ) +(y 2 − (i) (i) )
i∈points h 31 x 1 + h 32 y 1 + h 33 h 31 x 1 + h 32 y 1 + h 33
where g could be the identity function, which is not a good idea if we have outliers,
or is an M-estimator. This function is invariant to the scale of H, so we need
some form of normalization. We could normalize by setting one entry to one (not a
good idea, as it biases the results), or by requiring that the Frobenius norm is one.
Good software for estimating homographies is now available on the Web. Manolis
Lourakis publishes a C/C++ library at http://www.ics.forth.gr/ ~ lourakis/
homest/; there is a set of MATLAB functions for multiple view geometry at http:
//www.robots.ox.ac.uk/ vgg/hzbook/code/, written by David Capel, Andrew
~
Fitzgibbon, Peter Kovesi, Tomas Werner, Yoni Wexler, and Andrew Zisserman.
Finally, OpenCV has homography estimation routines in it, too.

