Class OrthogonalLineFitHomogeneous

java.lang.Object
imagingbook.common.geometry.fitting.line.OrthogonalLineFitHomogeneous
All Implemented Interfaces:
LineFit

public class OrthogonalLineFitHomogeneous extends Object implements LineFit

This class implements line fitting by orthogonal regression to a set of 2D points by solving a homogeneous linear system. See Sec. 6.7.1 of [1] and Sec. 10.2.2 (Alg. 10.2) of [2] for additional details.

[1] W. Gander, M. J. Gander, and F. Kwok. "Scientific Computing – An Introduction using Maple and MATLAB". Springer (2014).
[2] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/09/29
See Also:
  • Constructor Details

    • OrthogonalLineFitHomogeneous

      Constructor, performs a orthogonal regression fit to the specified points. At least two different points are required.
      Parameters:
      points - an array with at least 2 points
  • Method Details

    • getSize

      public int getSize()
      Description copied from interface: LineFit
      Returns the size of the point set used for calculating this line fit.
      Specified by:
      getSize in interface LineFit
      Returns:
      the number of sample points used for fitting
    • getLineParameters

      public double[] getLineParameters()
      Description copied from interface: LineFit
      Returns the parameters [A, B, C] for the AlgebraicLine associated with this line fit. To be implemented by concrete classes. null is returned if no fit was found.
      Specified by:
      getLineParameters in interface LineFit
      Returns:
      algebraic line parameters [A, B, C]
      See Also: