public abstract class EllipseClustersIntoGrid
extends java.lang.Object
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
| Modifier and Type | Class and Description |
|---|---|
static class |
EllipseClustersIntoGrid.Edge |
static class |
EllipseClustersIntoGrid.Grid
Specifies the grid.
|
static class |
EllipseClustersIntoGrid.NodeInfo |
| Modifier and Type | Field and Description |
|---|---|
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.NodeInfo> |
contour |
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.Grid> |
foundGrids |
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.NodeInfo> |
listInfo |
protected static double |
MAX_LINE_ANGLE_CHANGE |
protected org.ddogleg.sorting.QuickSortComparator<EllipseClustersIntoGrid.Edge> |
sorter |
protected boolean |
verbose |
| Constructor and Description |
|---|
EllipseClustersIntoGrid() |
| Modifier and Type | Method and Description |
|---|---|
protected static EllipseClustersIntoGrid.NodeInfo |
findClosestEdge(EllipseClustersIntoGrid.NodeInfo n,
georegression.struct.point.Point2D_F64 p)
Finds the node which is an edge of 'n' that is closest to point 'p'
|
protected static java.util.List<EllipseClustersIntoGrid.NodeInfo> |
findLine(EllipseClustersIntoGrid.NodeInfo seed,
EllipseClustersIntoGrid.NodeInfo next,
int clusterSize,
java.util.List<EllipseClustersIntoGrid.NodeInfo> line,
boolean ccw)
Finds all the nodes which form an approximate line
|
org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.Grid> |
getGrids()
Returns the set of grids which were found
|
static int |
indexOf(java.util.List<EllipsesIntoClusters.Node> list,
int value)
Finds the node with the index of 'value'
|
boolean |
isVerbose() |
abstract 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.
|
protected static 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) |
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.Grid> foundGrids
protected static double MAX_LINE_ANGLE_CHANGE
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.NodeInfo> listInfo
protected org.ddogleg.sorting.QuickSortComparator<EllipseClustersIntoGrid.Edge> sorter
protected org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.NodeInfo> contour
protected boolean verbose
public abstract void process(java.util.List<georegression.struct.curve.EllipseRotated_F64> ellipses,
java.util.List<java.util.List<EllipsesIntoClusters.Node>> clusters)
getGrids() to retrieve the results.ellipses - (input) List of all the ellipsesclusters - (Input) Description of all the clustersprotected static java.util.List<EllipseClustersIntoGrid.NodeInfo> findLine(EllipseClustersIntoGrid.NodeInfo seed, EllipseClustersIntoGrid.NodeInfo next, int clusterSize, java.util.List<EllipseClustersIntoGrid.NodeInfo> line, boolean ccw)
seed - First ellipsenext - Second ellipse, specified direction of line relative to seedline - protected static EllipseClustersIntoGrid.NodeInfo selectSeedNext(EllipseClustersIntoGrid.NodeInfo prevSeed, EllipseClustersIntoGrid.NodeInfo prevNext, EllipseClustersIntoGrid.NodeInfo currentSeed, boolean ccw)
prevSeed - First node in the previous rowprevNext - Second node in the previous rowcurrentSeed - First node in the current rowprotected static EllipseClustersIntoGrid.NodeInfo findClosestEdge(EllipseClustersIntoGrid.NodeInfo n, georegression.struct.point.Point2D_F64 p)
public static int indexOf(java.util.List<EllipsesIntoClusters.Node> list, int value)
public org.ddogleg.struct.FastQueue<EllipseClustersIntoGrid.Grid> getGrids()
public boolean isVerbose()
public void setVerbose(boolean verbose)