Class SquaresIntoRegularClusters
java.lang.Object
boofcv.alg.fiducial.calib.squares.SquaresIntoClusters
boofcv.alg.fiducial.calib.squares.SquaresIntoRegularClusters
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 Summary
Modifier and TypeFieldDescriptionprotected LineSegment2D_F64
protected SquareGraph
protected LineSegment2D_F64
protected LineSegment2D_F64
int
Fields inherited from class boofcv.alg.fiducial.calib.squares.SquaresIntoClusters
clusters, nodes, open
-
Constructor Summary
ConstructorDescriptionSquaresIntoRegularClusters
(double spaceToSquareRatio, int maxNeighbors, double maxNeighborDistanceRatio) Declares data structures and configures algorithm -
Method Summary
Modifier and TypeMethodDescriptionprocess
(List<Polygon2D_F64> squares) Processes the unordered set of squares and creates a graph out of them using prior knowledge and geometric constraints.Methods inherited from class boofcv.alg.fiducial.calib.squares.SquaresIntoClusters
findClusters, recycleData
-
Field Details
-
maxNeighbors
public int maxNeighbors -
graph
-
lineA
-
lineB
-
connectLine
-
-
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 lengthsmaxNeighbors
- The maximum number of neighbors it will look at when connecting a nodemaxNeighborDistanceRatio
- 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
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().
-