Class HomographyTotalLeastSquares


public class HomographyTotalLeastSquares
extends 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.

  • Field Details

  • Constructor Details

    • HomographyTotalLeastSquares

      public HomographyTotalLeastSquares()
  • Method Details

    • process

      public boolean process​(List<AssociatedPair> points, 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

      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.
      true if the calculation was a success.