Class LinearLeastSquaresViaNormalEquationBase

All Implemented Interfaces:
CompatibleWithMark

public abstract class LinearLeastSquaresViaNormalEquationBase extends ConicFitterBase
Base class for linear least squares fitting using the normal equation method.
  • Constructor Details

    • LinearLeastSquaresViaNormalEquationBase

      public LinearLeastSquaresViaNormalEquationBase()
  • Method Details

    • fit

      public void fit(List<Point3f> points, Mark mark, Dimensions dimensions) throws PointsFitterException
      Description copied from class: PointsFitter
      Fits a mark to a set of points within given dimensions.
      Specified by:
      fit in class PointsFitter
      Parameters:
      points - the list of points to fit the mark to
      mark - the mark to be fitted (will be modified)
      dimensions - the dimensions within which the fitting occurs
      Throws:
      PointsFitterException - if an error occurs during the fitting process
    • minNumPoints

      protected abstract int minNumPoints()
      Returns the minimum number of points required for fitting.
      Returns:
      the minimum number of points
    • applyCoefficientsToMark

      protected abstract void applyCoefficientsToMark(cern.colt.matrix.DoubleMatrix2D matrixV, Mark mark, Dimensions dimensions) throws PointsFitterException
      Applies the calculated coefficients to the mark.
      Parameters:
      matrixV - the matrix of coefficients
      mark - the Mark to update
      dimensions - the Dimensions of the image
      Throws:
      PointsFitterException - if there's an error applying the coefficients
    • createDesignMatrix

      protected abstract cern.colt.matrix.DoubleMatrix2D createDesignMatrix(List<Point3f> points)
      Creates the design matrix from the input points.
      Parameters:
      points - the list of Point3f to use for creating the design matrix
      Returns:
      the design matrix as a DoubleMatrix2D