Class EllipsesIntoClusters


public class EllipsesIntoClusters extends Object
Given an unordered list of ellipses found in the image connect them into clusters. A cluster of ellipses will be composed of ellipses which are spatially close to each other and have major axises which are of similar size.
  • Constructor Details

    • EllipsesIntoClusters

      public EllipsesIntoClusters(double maxDistanceToMajorAxisRatio, double sizeSimilarityTolerance, double edgeIntensitySimilarityTolerance)
      Configures clustering
      maxDistanceToMajorAxisRatio - The maximum distance away the center of another ellipse that will be considered specifies as a multiple of the ellipse's major axis
      sizeSimilarityTolerance - How similar two ellipses must be to be connected. 0 to 1.0. 1.0 = perfect match and 0.0 = infinite difference in size
      edgeIntensitySimilarityTolerance - How similar the intensity of the ellipses edges need to be. 0 to 1.0. 1.0 = perfect
  • Method Details

    • process

      public void process(List<BinaryEllipseDetector.EllipseInfo> ellipses, List<List<EllipsesIntoClusters.Node>> output)
      Processes the ellipses and creates clusters.
      ellipses - Set of unordered ellipses
      output - Resulting found clusters. Cleared automatically. Returned lists are recycled on next call.
    • getMaxDistanceToMajorAxisRatio

      public double getMaxDistanceToMajorAxisRatio()
    • setMaxDistanceToMajorAxisRatio

      public void setMaxDistanceToMajorAxisRatio(double maxDistanceToMajorAxisRatio)
    • getSizeSimilarityTolerance

      public double getSizeSimilarityTolerance()
    • setSizeSimilarityTolerance

      public void setSizeSimilarityTolerance(double sizeSimilarityTolerance)
    • getMinimumClusterSize

      public int getMinimumClusterSize()
    • setMinimumClusterSize

      public void setMinimumClusterSize(int minimumClusterSize)