Class SquaresIntoRegularClusters

java.lang.Object
boofcv.alg.fiducial.calib.squares.SquaresIntoClusters
boofcv.alg.fiducial.calib.squares.SquaresIntoRegularClusters

public class SquaresIntoRegularClusters extends SquaresIntoClusters
Processes the detected squares in the image and connects them into clusters. Squares can be connected to each other if two equivalent sides are parallel and their distance apart is "reasonable". The parallel requirement take advantage of line under perspective distortion remaining parallel.
  • Field Details

  • Constructor Details

    • SquaresIntoRegularClusters

      public SquaresIntoRegularClusters(double spaceToSquareRatio, int maxNeighbors, double maxNeighborDistanceRatio)
      Declares data structures and configures algorithm
      Parameters:
      spaceToSquareRatio - Ratio of space between squares to square lengths
      maxNeighbors - The maximum number of neighbors it will look at when connecting a node
      maxNeighborDistanceRatio - Maximum distance away a neighbor can be from a square to be connected. Relative to the size of the square. Try 1.35
  • Method Details

    • process

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