Class HomographyTotalLeastSquares


  • public class HomographyTotalLeastSquares
    extends java.lang.Object

    Direct method for computing homography that is more computationally efficient and stable than DLT. Takes advantage of the sparse structure of the matrix found in DLT to reduce the number of computations and EYM matrix approximation. See the paper [1] for details. Requires at least four points.

    [1] Harker, Matthew, and Paul O'Leary. "Computation of Homographies." BMVC. 2005.

    • Constructor Detail

      • HomographyTotalLeastSquares

        public HomographyTotalLeastSquares()
    • Method Detail

      • process

        public boolean process​(java.util.List<AssociatedPair> points,
                               org.ejml.data.DMatrixRMaj foundH)

        Computes the homography matrix given a set of observed points in two images. A set of AssociatedPair is passed in. The computed homography 'H' is found such that the attributes 'p1' and 'p2' in AssociatedPair refers to x1 and x2, respectively, in the equation below:
        x2 = H*x1

        Parameters:
        points - A set of observed image points that are generated from a planar object. Minimum of 4 pairs required.
        foundH - Output: Storage for the found solution. 3x3 matrix.
        Returns:
        true if the calculation was a success.