public class DetectCircleRegularGrid<T extends ImageGray<T>> extends DetectCircleGrid<T>
Detects regular grids of circles, see below. A valid grid is in counter-clockwise order and if there are multiple possible solution the solution with corner (0,0) closest to the pixel coordinate (0,0) is selected
For each circle there is are four control points. Each control point corresponds to the tangent line connecting the vertical and horizontal neigbors. Tangent points are used since they are invariant under perspective distortion.
DetectCircleRegularGridpublic DetectCircleRegularGrid(int numRows, int numCols, InputToBinary<T> inputToBinary, BinaryEllipseDetector<T> ellipseDetector, EllipsesIntoClusters clustering)Creates and configures the detector
numRows- number of rows in grid
numCols- number of columns in grid
inputToBinary- Converts the input image into a binary image
ellipseDetector- Detects ellipses inside the image
clustering- Finds clusters of ellipses
configureContourDetectorprotected void configureContourDetector(T gray)Description copied from class:
DetectCircleGridConfigures the contour detector based on the image size. Setting a maximum contour and turning off recording of inner contours and improve speed and reduce the memory foot print significantly.
totalEllipsespublic int totalEllipses(int numRows, int numCols)Description copied from class:
DetectCircleGridComputes the number of ellipses on the grid
putGridIntoCanonicalprotected void putGridIntoCanonical(EllipseClustersIntoGrid.Grid g)Puts the grid into a canonical orientation