Package boofcv.alg.shapes.ellipse
Class SnapToEllipseEdge<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.shapes.edge.BaseIntegralEdge<T>
boofcv.alg.shapes.ellipse.SnapToEllipseEdge<T>
Refines an initial estimate of an elipse using a subpixel contour technique. A local line integral around each
point is used to determine how important each point is. The contour being
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected FitEllipseWeightedAlgebraic_F64protected intprotected intprotected EllipseRotated_F64protected intprotected DogArray<Point2D_F64>protected DogArray_F64Fields inherited from class boofcv.alg.shapes.edge.BaseIntegralEdge
integral, integralImage -
Constructor Summary
ConstructorsConstructorDescriptionSnapToEllipseEdge(int numSampleContour, int radialSamples, Class<T> imageType) Constructor with configuration -
Method Summary
Modifier and TypeMethodDescriptionprotected static doubleComputes a numerical value for the difference in parameters between the two ellipsesdoubleintbooleanprocess(EllipseRotated_F64 input, EllipseRotated_F64 refined) Refines provided list by snapping it to edges found in the imagevoidsetConvergenceTol(double convergenceTol) voidsetMaxIterations(int maxIterations) Methods inherited from class boofcv.alg.shapes.edge.BaseIntegralEdge
getInputType, setImage, setTransform
-
Field Details
-
maxIterations
protected int maxIterations -
convergenceTol
protected double convergenceTol -
numSampleContour
protected int numSampleContour -
radialSamples
protected int radialSamples -
weights
-
samplePts
-
fitter
-
previous
-
-
Constructor Details
-
SnapToEllipseEdge
Constructor with configuration- Parameters:
numSampleContour- Maximum number of iterations it will performanceradialSamples- When the difference between two ellipses is less than this amount stop iteratingimageType- Type of gray-scale input image
-
-
Method Details
-
process
Refines provided list by snapping it to edges found in the image- Parameters:
input- (Output) Close approximation of the ellipse in the imagerefined- (Output) Storage for refined estimate. Can be same instance as input- Returns:
- True if a refined estimate could be found, false if it failed
-
change
Computes a numerical value for the difference in parameters between the two ellipses -
getMaxIterations
public int getMaxIterations() -
setMaxIterations
public void setMaxIterations(int maxIterations) -
getConvergenceTol
public double getConvergenceTol() -
setConvergenceTol
public void setConvergenceTol(double convergenceTol)
-