This page concerns homest, a C/C++ library for homography estimation that is distributed
under the GNU General Public License (GPL).
A homography (sometimes also called
a collineation) is a general plane to plane projective transformation whose estimation from
matched image features is often necessary in several vision tasks. A homography has eight degrees of
freedom and is represented by a non-singular homogeneous 3x3 matrix.
homest implements a technique for non-linear, robust homography estimation from matched
image point features. This technique computes a homography estimate that minimizes an appropriate
cost function defined on matching points (currently either non-symmetric transfer error, symmetric
transfer error, Sampson error or reprojection error) and includes robust regression techniques for
coping with outliers. Briefly, the algorithm implemented by homest is the following:
Note that the minimization of the reprojection error involves the estimation of “corrected”
point coordinates for both images, so that the homography relation p'=H*p is satified precisely for the
estimated homography H and all matching pairs of corrected points p, p'. Thus, this is the optimal
method for estimating a homography but also the most expensive one in terms of the required computations.
On the other hand, the approaches employing the symmetric transfer and Sampson errors constitute
reasonable treadeoffs between accuracy and running time.
In all cases, the minimization is performed using the Levenberg-Marquardt algorithm, see
M.I.A. Lourakis, “levmar: Levenberg-Marquardt
Nonlinear Least Squares Algorithms in C/C++”, [web page]
Apart from fully projective (i.e. 8 DOF) homographies, homest can also estimate affine homographies
whose third row is fixed to [0, 0, 1] and thus depend upon 6 parameters. An affine homography is a good
approximation of image motion when a large focal length lens is employed or when the point matches used
for estimating it originate from a small image area. In such cases, the estimation of an affine homography
can be more stable compared to estimating a fully projective homography. When estimating affine
homographies, the third step of the algorithm outlined above is omitted since for them, the algebraic
error equals the geometric one.
More details on homography estimation can be found in chapter 4 of R. Hartley
and A. Zisserman's textbook titled “Multiple
View Geometry in Computer Vision”, Cambridge University Press, 2003.
Note that homest does not include any means for detecting
and matching point features between images. Such functionality can be supplied by other software
such as D. Lowe's SIFT detector,
the VLFeat library or, in some cases, the
To compile, homest requires the levmar
Levenberg-Marquardt non-linear least squares package, which in turn relies on BLAS/LAPACK.
The source code is distributed in a gzip'ed tar file. It has been tested under linux with
gcc/lcc and under windows with
MSVC but should compile with any ANSI compliant C compiler. Remember to include homest.h from your C/C++ code.
If you find this package useful or have any comments/questions/suggestions,
please contact M. Lourakis at
Also, in case that you use homest in your published work, please include a reference/acknowledgement to this page: [ bibtex entry ].