Class LinearLeastSquaresViaNormalEquationBase
- All Implemented Interfaces:
CompatibleWithMark
Base class for linear least squares fitting using the normal equation method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidapplyCoefficientsToMark(cern.colt.matrix.DoubleMatrix2D matrixV, Mark mark, Dimensions dimensions) Applies the calculated coefficients to the mark.protected abstract cern.colt.matrix.DoubleMatrix2DcreateDesignMatrix(List<Point3f> points) Creates the design matrix from the input points.voidfit(List<Point3f> points, Mark mark, Dimensions dimensions) Fits a mark to a set of points within given dimensions.protected abstract intReturns the minimum number of points required for fitting.Methods inherited from class org.anchoranalysis.plugin.points.bean.fitter.ConicFitterBase
assignTo, getInputPointShift, getScaleRadii, getShell, getSubtractRadii, setInputPointShift, setScaleRadii, setShell, setSubtractRadiiMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.anchoranalysis.mpp.mark.CompatibleWithMark
isCompatibleWith
-
Constructor Details
-
LinearLeastSquaresViaNormalEquationBase
public LinearLeastSquaresViaNormalEquationBase()
-
-
Method Details
-
fit
public void fit(List<Point3f> points, Mark mark, Dimensions dimensions) throws PointsFitterException Description copied from class:PointsFitterFits a mark to a set of points within given dimensions.- Specified by:
fitin classPointsFitter- Parameters:
points- the list of points to fit the mark tomark- 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 coefficientsmark- theMarkto updatedimensions- theDimensionsof the image- Throws:
PointsFitterException- if there's an error applying the coefficients
-
createDesignMatrix
Creates the design matrix from the input points.- Parameters:
points- the list ofPoint3fto use for creating the design matrix- Returns:
- the design matrix as a
DoubleMatrix2D
-