findChessboardCorners
finds the positions of the internal
corners of a calibration chessboard.
Usage
findChessboardCorners(
image,
pprow,
ppcol,
adaptive_threshold = TRUE,
normalize = TRUE,
filter_quads = FALSE,
fast_check = TRUE
)
Arguments
- image
An 8-bit (8U)
Image
object.- pprow, ppcol
The number of internal corners per row and column of the chessboard.
- adaptive_threshold
A logical indicating whether to use adaptive thresholding (the default) to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness).
- normalize
A logical indicating whether to normalize (the default) the image gamma with
histEq
before applying fixed or adaptive thresholding.- filter_quads
A logical indicating whether to use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage (default: FALSE).
- fast_check
logical indicating whether to run a fast check on the image that looks for chessboard corners, and shortcut the call if none is found. This can drastically speed up the call in the degenerate condition when no chessboard is observed.
Value
A (pprow * ppcol)
x2
matrix. If the matrix is empty then
no chessboard with the indicated dimensions is detected.
Note
You can find a suitable chessboard pattern at https://github.com/opencv/opencv/blob/4.x/doc/pattern.png
Author
Simon Garnier, garnier@njit.edu
Examples
checkerboard <- image(
system.file("sample_img/checkerboard6x9.png", package = "Rvision")
)
pts <- findChessboardCorners(checkerboard, 6, 9)