Package boofcv.alg.fiducial.calib.chess
Class ChessboardCornerClusterFinder<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.fiducial.calib.chess.ChessboardCornerClusterFinder<T>
- All Implemented Interfaces:
VerbosePrint
public class ChessboardCornerClusterFinder<T extends ImageGray<T>>
extends Object
implements VerbosePrint
From a set of
ChessboardCorners
find all the chessboard grids in view. Assumptions
about the grids size are not made at this stage.
Algorithmic Steps:
- Nearest neighbor search for each corners. For each corner, matches are put into parallel and perpendicular sets
- Identify ambiguous corners that are close to each other and pick be most intense corner
- Prune corners from each nodes parallel and perpendicular sets if they are not mutual
- Select 2 to 4 connections for each corner using projective invariant properties
- Prune non mutual connections and save a list of modified vertexes
- Use known graph to find better edges for modified vertexes
- Find connected sets of vertexes and convert into output format
- Orientation of corners alternates by 90 degrees
- A corner can only be connected to a corner with an orientation perpendicular to it
- Between any two adjacent connections there must lie a corner with an orientation that is parallel.
- Without perspective distortion, corners are laid out in a grid pattern
- Assume projective transform, with fuzzy parameters to account for lens distortion
- Straight lines are straight
- Order of vector angles from a point to another point does not change
- Order of intersections along a line does not change
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Collection of edges that share the same relationship with the source vertex.static class
Describes the relationship between two vertexes in the graph.static class
static class
Graph vertex for a corner. -
Constructor Summary
ConstructorDescriptionChessboardCornerClusterFinder
(ChessboardCornerEdgeIntensity<T> computeConnInten) ChessboardCornerClusterFinder
(Class<T> imageType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Prints the graph.void
process
(T image, List<ChessboardCorner> corners, int numLevels) Processes corners and finds clusters of chessboard patternsprotected void
pruneConnectionsByIntensity
(List<ChessboardCorner> corners) Computes edge intensity and prunes connections if it's too low relativevoid
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Constructor Details
-
ChessboardCornerClusterFinder
-
ChessboardCornerClusterFinder
-
-
Method Details
-
process
Processes corners and finds clusters of chessboard patterns- Parameters:
corners
- Detected chessboard patterns. Not modified.
-
pruneConnectionsByIntensity
Computes edge intensity and prunes connections if it's too low relative -
printDualGraph
public void printDualGraph()Prints the graph. Used for debugging the code. -
printConnectionGraph
public void printConnectionGraph() -
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-