Class EllipseClustersIntoHexagonalGrid
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 EllipseClustersIntoGrid.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
-
Nested Class Summary
Nested classes/interfaces inherited from class boofcv.alg.fiducial.calib.circle.EllipseClustersIntoGrid
EllipseClustersIntoGrid.Edge, EllipseClustersIntoGrid.Grid, EllipseClustersIntoGrid.NodeInfo
-
Field Summary
Fields inherited from class boofcv.alg.fiducial.calib.circle.EllipseClustersIntoGrid
contour, foundGrids, listInfo, MAX_LINE_ANGLE_CHANGE, sorter, verbose
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(List<EllipseRotated_F64> ellipses, List<List<EllipsesIntoClusters.Node>> clusters) Computes grids from the clusters.Methods inherited from class boofcv.alg.fiducial.calib.circle.EllipseClustersIntoGrid
findClosestEdge, findLine, getGrids, indexOf, isVerbose, selectSeedNext, setVerbose
-
Constructor Details
-
EllipseClustersIntoHexagonalGrid
public EllipseClustersIntoHexagonalGrid()
-
-
Method Details
-
process
public void process(List<EllipseRotated_F64> ellipses, List<List<EllipsesIntoClusters.Node>> clusters) Computes grids from the clusters. CallEllipseClustersIntoGrid.getGrids()
to retrieve the results.- Specified by:
process
in classEllipseClustersIntoGrid
- Parameters:
ellipses
- (input) List of all the ellipsesclusters
- (Input) Description of all the clusters
-