Package georegression.fitting.curves
Class RefineEllipseEuclideanLeastSquares_F32
java.lang.Object
georegression.fitting.curves.RefineEllipseEuclideanLeastSquares_F32
@Generated("georegression.fitting.curves.RefineEllipseEuclideanLeastSquares_F64")
public class RefineEllipseEuclideanLeastSquares_F32
extends Object
Minimizes 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
Modifier and TypeClassDescriptionclass
class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaults to a robust solver since this problem often encounters singularities.RefineEllipseEuclideanLeastSquares_F32
(UnconstrainedLeastSquares<org.ejml.data.DMatrixRMaj> optimizer) -
Method Summary
Modifier and TypeMethodDescriptionfloat
getFound()
boolean
refine
(EllipseRotated_F32 initial, List<Point2D_F32> points) void
setFtol
(float ftol) void
setGtol
(float gtol) void
setMaxIterations
(int maxIterations)
-
Field Details
-
optimizer
-
-
Constructor Details
-
RefineEllipseEuclideanLeastSquares_F32
public RefineEllipseEuclideanLeastSquares_F32(UnconstrainedLeastSquares<org.ejml.data.DMatrixRMaj> optimizer) -
RefineEllipseEuclideanLeastSquares_F32
public RefineEllipseEuclideanLeastSquares_F32()Defaults to a robust solver since this problem often encounters singularities.
-
-
Method Details
-
setFtol
public void setFtol(float ftol) -
setGtol
public void setGtol(float gtol) -
setMaxIterations
public void setMaxIterations(int maxIterations) -
getOptimizer
-
refine
-
getFound
-
getFitError
public float getFitError() -
createError
-
createJacobian
-