public class SquaresIntoRegularClusters extends SquaresIntoClusters
| Modifier and Type | Field and Description |
|---|---|
protected georegression.struct.line.LineSegment2D_F64 |
connectLine |
protected SquareGraph |
graph |
protected georegression.struct.line.LineSegment2D_F64 |
lineA |
protected georegression.struct.line.LineSegment2D_F64 |
lineB |
int |
maxNeighbors |
clusters, nodes, open| Constructor and Description |
|---|
SquaresIntoRegularClusters(double spaceToSquareRatio,
int maxNeighbors,
double maxNeighborDistanceRatio)
Declares data structures and configures algorithm
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.util.List<SquareNode>> |
process(java.util.List<georegression.struct.shapes.Polygon2D_F64> squares)
Processes the unordered set of squares and creates a graph out of them using prior knowledge and geometric
constraints.
|
findClusters, recycleDatapublic int maxNeighbors
protected SquareGraph graph
protected georegression.struct.line.LineSegment2D_F64 lineA
protected georegression.struct.line.LineSegment2D_F64 lineB
protected georegression.struct.line.LineSegment2D_F64 connectLine
public SquaresIntoRegularClusters(double spaceToSquareRatio,
int maxNeighbors,
double maxNeighborDistanceRatio)
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.35public java.util.List<java.util.List<SquareNode>> process(java.util.List<georegression.struct.shapes.Polygon2D_F64> squares)
squares - Set of squares