Package boofcv.alg.fiducial.calib.circle
Class EllipseClustersIntoGrid
java.lang.Object
boofcv.alg.fiducial.calib.circle.EllipseClustersIntoGrid
- Direct Known Subclasses:
EllipseClustersIntoHexagonalGrid
,EllipseClustersIntoRegularGrid
Base class for ordering clusters of ellipses into grids
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
Modifier and TypeClassDescriptionstatic class
static class
Specifies the grid.static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected FastArray<EllipseClustersIntoGrid.NodeInfo>
protected DogArray<EllipseClustersIntoGrid.Grid>
protected DogArray<EllipseClustersIntoGrid.NodeInfo>
protected static double
protected QuickSortComparator<EllipseClustersIntoGrid.Edge>
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static @Nullable EllipseClustersIntoGrid.NodeInfo
Finds the node which is an edge of 'n' that is closest to point 'p'protected static @Nullable List<EllipseClustersIntoGrid.NodeInfo>
findLine
(EllipseClustersIntoGrid.NodeInfo seed, @Nullable EllipseClustersIntoGrid.NodeInfo next, int clusterSize, @Nullable List<EllipseClustersIntoGrid.NodeInfo> line, boolean ccw) Finds all the nodes which form an approximate linegetGrids()
Returns the set of grids which were foundstatic int
indexOf
(List<EllipsesIntoClusters.Node> list, int value) Finds the node with the index of 'value'boolean
abstract void
process
(List<EllipseRotated_F64> ellipses, List<List<EllipsesIntoClusters.Node>> clusters) Computes grids from the clusters.protected static @Nullable EllipseClustersIntoGrid.NodeInfo
selectSeedNext
(EllipseClustersIntoGrid.NodeInfo prevSeed, EllipseClustersIntoGrid.NodeInfo prevNext, EllipseClustersIntoGrid.NodeInfo currentSeed, boolean ccw) Select the first node (currentSeed) in the next row it finds the next element in the next row by looking at the first and second elements in the previous row.void
setVerbose
(boolean verbose)
-
Field Details
-
foundGrids
-
MAX_LINE_ANGLE_CHANGE
protected static double MAX_LINE_ANGLE_CHANGE -
listInfo
-
sorter
-
contour
-
verbose
protected boolean verbose
-
-
Constructor Details
-
EllipseClustersIntoGrid
protected EllipseClustersIntoGrid()
-
-
Method Details
-
process
public abstract void process(List<EllipseRotated_F64> ellipses, List<List<EllipsesIntoClusters.Node>> clusters) Computes grids from the clusters. CallgetGrids()
to retrieve the results.- Parameters:
ellipses
- (input) List of all the ellipsesclusters
- (Input) Description of all the clusters
-
findLine
@Nullable protected static @Nullable List<EllipseClustersIntoGrid.NodeInfo> findLine(EllipseClustersIntoGrid.NodeInfo seed, @Nullable @Nullable EllipseClustersIntoGrid.NodeInfo next, int clusterSize, @Nullable @Nullable List<EllipseClustersIntoGrid.NodeInfo> line, boolean ccw) Finds all the nodes which form an approximate line- Parameters:
seed
- First ellipsenext
- Second ellipse, specified direction of line relative to seed- Returns:
- All the nodes along the line
-
selectSeedNext
@Nullable protected static @Nullable EllipseClustersIntoGrid.NodeInfo selectSeedNext(EllipseClustersIntoGrid.NodeInfo prevSeed, EllipseClustersIntoGrid.NodeInfo prevNext, EllipseClustersIntoGrid.NodeInfo currentSeed, boolean ccw) Select the first node (currentSeed) in the next row it finds the next element in the next row by looking at the first and second elements in the previous row. It selects the edge in currentSeed which cones closest to matching the angle of 'prevSeed' and 'prevNext'- Parameters:
prevSeed
- First node in the previous rowprevNext
- Second node in the previous rowcurrentSeed
- First node in the current row- Returns:
- The found node or null if one was not found
-
findClosestEdge
@Nullable protected static @Nullable EllipseClustersIntoGrid.NodeInfo findClosestEdge(EllipseClustersIntoGrid.NodeInfo n, Point2D_F64 p) Finds the node which is an edge of 'n' that is closest to point 'p' -
indexOf
Finds the node with the index of 'value' -
getGrids
Returns the set of grids which were found- Returns:
- found grids
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose)
-