georegression.fitting.ellipse
Class RefineEllipseEuclideanLeastSquares
- java.lang.Object
-
- georegression.fitting.ellipse.RefineEllipseEuclideanLeastSquares
-
public class RefineEllipseEuclideanLeastSquares extends java.lang.ObjectMinimizes the Euclidean distance between an ellipse and a set of points which it has been fit to. Minimization is done using a user configurable unconstrained optimization algorithm. The error for each observation 'i' is computed using the following equation:
[x,y] = [p_x,p_y] - ([x_0,y_0] - a*R*X)
where R = [cos(phi),-sin(phi);sin(phi),cos(phi)] and X = [a*cos(theta),b*sin*(theta)], where theta is the angle of the closest point on the ellipse for the point.NOTE: This implementation does not take advantage of the sparsity found in the Jacobian. Could be speed up a bit.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classRefineEllipseEuclideanLeastSquares.ErrorclassRefineEllipseEuclideanLeastSquares.Jacobian
-
Constructor Summary
Constructors Constructor and Description RefineEllipseEuclideanLeastSquares()Defaults to a robust solver since this problem often encounters singularities.RefineEllipseEuclideanLeastSquares(UnconstrainedLeastSquares optimizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetFitError()EllipseRotated_F64getFound()UnconstrainedLeastSquaresgetOptimizer()booleanrefine(EllipseRotated_F64 initial, java.util.List<Point2D_F64> points)voidsetFtol(double ftol)voidsetGtol(double gtol)voidsetMaxIterations(int maxIterations)
-
-
-
Constructor Detail
-
RefineEllipseEuclideanLeastSquares
public RefineEllipseEuclideanLeastSquares(UnconstrainedLeastSquares optimizer)
-
RefineEllipseEuclideanLeastSquares
public RefineEllipseEuclideanLeastSquares()
Defaults to a robust solver since this problem often encounters singularities.
-
-
Method Detail
-
setFtol
public void setFtol(double ftol)
-
setGtol
public void setGtol(double gtol)
-
setMaxIterations
public void setMaxIterations(int maxIterations)
-
getOptimizer
public UnconstrainedLeastSquares getOptimizer()
-
refine
public boolean refine(EllipseRotated_F64 initial, java.util.List<Point2D_F64> points)
-
getFound
public EllipseRotated_F64 getFound()
-
getFitError
public double getFitError()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG