- All Implemented Interfaces:
public class ChessboardCornerClusterFinder<T extends ImageGray<T>> extends Object implements VerbosePrint
From a set of
ChessboardCornersfind 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
Nested Classes Modifier and Type Class Description
static classCollection of edges that share the same relationship with the source vertex.
static classDescribes the relationship between two vertexes in the graph.
static classGraph vertex for a corner.
Modifier and Type Method Description
()Prints the graph.
T image, List<ChessboardCorner> corners, int numLevels)(Processes corners and finds clusters of chessboard patterns
List<ChessboardCorner> corners)(Computes edge intensity and prunes connections if it's too low relative
PrintStream out, @Nullable Set<String> configuration)(@Nullable
processProcesses corners and finds clusters of chessboard patterns
corners- Detected chessboard patterns. Not modified.
pruneConnectionsByIntensityComputes edge intensity and prunes connections if it's too low relative
printDualGraphpublic void printDualGraph()Prints the graph. Used for debugging the code.
printConnectionGraphpublic void printConnectionGraph()
setVerbosepublic void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)