Class SnapToEllipseEdge<T extends ImageGray<T>>

java.lang.Object
boofcv.alg.shapes.edge.BaseIntegralEdge<T>
boofcv.alg.shapes.ellipse.SnapToEllipseEdge<T>

public class SnapToEllipseEdge<T extends ImageGray<T>> extends BaseIntegralEdge<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 Details

  • Constructor Details

    • SnapToEllipseEdge

      public SnapToEllipseEdge(int numSampleContour, int radialSamples, Class<T> imageType)
      Constructor with configuration
      Parameters:
      numSampleContour - Maximum number of iterations it will performance
      radialSamples - When the difference between two ellipses is less than this amount stop iterating
      imageType - Type of gray-scale input image
  • Method Details

    • process

      public boolean process(EllipseRotated_F64 input, EllipseRotated_F64 refined)
      Refines provided list by snapping it to edges found in the image
      Parameters:
      input - (Output) Close approximation of the ellipse in the image
      refined - (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

      protected static double change(EllipseRotated_F64 a, EllipseRotated_F64 b)
      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)