Added documentation for cirlces' grid detection

This commit is contained in:
Ilya Lysenkov 2010-12-21 09:30:21 +00:00
parent 84dc12d387
commit 5f5dc91bfd
2 changed files with 37 additions and 0 deletions

View File

@ -621,6 +621,43 @@ drawChessboardCorners(img, patternsize, Mat(corners), patternfound);
\textbf{Note:} the function requires some white space (like a square-thick border, the wider the better) around the board to make the detection more robust in various environment (otherwise if there is no border and the background is dark, the outer black squares could not be segmented properly and so the square grouping and ordering algorithm will fail).
\cvCppFunc{findCirclesGrid}
Finds the centers of the cirlces' grid.
\cvdefCpp{bool findCirclesGrid( const Mat\& image, Size patternSize,\par
vector<Point2f>\& centers,\par
int flags=0 );}
\begin{description}
\cvarg{image}{Source circles' grid view; it must be an 8-bit grayscale or color
image}
\cvarg{patternSize}{The number of circles per grid row and column
( patternSize = Size( points\_per\_row, points\_per\_colum ) =
Size( columns, rows ) )}
\cvarg{centers}{The output array of centers detected}
\cvarg{flags}{Various operation flags, no flags are supported currently}
\end{description}
The function attempts to determine
whether the input image is a view of the circles' grid pattern and
locate the circles' centers. The function returns a
non-zero value if all of the centers have been found and they have been placed
in a certain order (row by row, left to right in every row),
otherwise, if the function fails to find all the corners or reorder
them, it returns 0.
Sample usage of detecting and drawing circles' centers:
\begin{lstlisting}
Size patternsize(7,7); //number of centers
Mat gray = ....; //source image
vector<Point2f> centers; //this will be filled by the detected centers
bool patternfound = findCirclesGrid(gray, patternsize, centers);
drawChessboardCorners(img, patternsize, Mat(centers), patternfound);
\end{lstlisting}
\textbf{Note:} the function requires some white space (like a square-thick border, the wider the better) around the board to make the detection more robust in various environment.
\ifCPy
\cvCPyFunc{FindExtrinsicCameraParams2}
\else

Binary file not shown.