Class SquaresIntoCrossClusters


public class SquaresIntoCrossClusters extends SquaresIntoClusters
Processes the detected squares in the image and connects them into clusters in which the corners of each square almost touches the corner of a neighbor.
  • Field Details

    • maxNeighbors

      public int maxNeighbors
  • Constructor Details

    • SquaresIntoCrossClusters

      public SquaresIntoCrossClusters(double maxCornerDistance, int maxNeighbors)
      Declares data structures and configures algorithm
      maxCornerDistance - Maximum distance two corners can be in pixels.
      maxNeighbors - Max number of neighbors it will consider. Try 4 or -1 for all
  • Method Details

    • process

      public List<List<SquareNode>> process(List<DetectPolygonFromContour.Info> squares)
      Processes the unordered set of squares and creates a graph out of them using prior knowledge and geometric constraints.
      squares - Set of squares
      List of graphs. All data structures are recycled on the next call to process().
    • getMaxCornerDistance

      public double getMaxCornerDistance()
    • setMaxCornerDistance

      public void setMaxCornerDistance(double maxCornerDistance)