public class EllipseClustersIntoHexagonalGrid extends EllipseClustersIntoGrid
Given a cluster of ellipses (created with EllipsesIntoClusters) order the ellipses into
a hexagonal grid pattern. In a hexagonal grid the center of each circle is the same distance from
its neighbors. Smallest grid size it will detect is 3 x 3.
Note that the returned grid is 'sparse'. every other node is skipped implicitly. This is caused by the asymmetry. Each row is offset by one circle/grid element.
Examples: 3x6 grid will have 9 elements total. grid(0,0) = [0] grid(0,2) = [1] grid(0,4) = [2] grid(1,1) = [3] grid(1,3) = [4] grid(1,5) = [5]
IMPORTANT: To properly construct the contour the clusters need to connect and jump over the "zig-zags". Thus at a minimum search radius should be distance between centers*2 if not more.
See Grid for a description of how the output grids are described. It uses a sparse format.
See DetectCircleHexagonalGrid for an example of an hexagonal grid
EllipseClustersIntoGrid.Edge, EllipseClustersIntoGrid.Grid, EllipseClustersIntoGrid.NodeInfocontour, foundGrids, listInfo, MAX_LINE_ANGLE_CHANGE, sorter, verbose| Constructor and Description |
|---|
EllipseClustersIntoHexagonalGrid() |
| Modifier and Type | Method and Description |
|---|---|
void |
process(java.util.List<georegression.struct.curve.EllipseRotated_F64> ellipses,
java.util.List<java.util.List<EllipsesIntoClusters.Node>> clusters)
Computes grids from the clusters.
|
findClosestEdge, findLine, getGrids, indexOf, isVerbose, selectSeedNext, setVerbosepublic void process(java.util.List<georegression.struct.curve.EllipseRotated_F64> ellipses,
java.util.List<java.util.List<EllipsesIntoClusters.Node>> clusters)
EllipseClustersIntoGrid.getGrids() to retrieve the results.process in class EllipseClustersIntoGridellipses - (input) List of all the ellipsesclusters - (Input) Description of all the clusters