Skip to content

findChessboardCornersSB

objdetectfunctionOpenCV 5.0.0
import { findChessboardCornersSB } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSimage, patternSize, corners, flags
FUNCTIONfindChessboardCornersSB
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Finds the positions of internal corners of the chessboard using a sector based approach.

Note: The function requires a white boarder with roughly the same width as one of the checkerboard fields around the whole board to improve the detection in various environments. In addition, because of the localized radon transformation it is beneficial to use round corners for the field corners which are located on the outside of the board. The following figure illustrates a sample checkerboard optimized for the detection. However, any other checkerboard can be used as well.

Use the generate_pattern.py Python script (tutorial_camera_calibration_pattern) to create the corresponding checkerboard pattern: \image html pics/checkerboard_radon.png width=60%

findChessboardCornersSB(image: Mat, patternSize: Size, corners: Mat, flags: number): boolean;
2 available overloads
findChessboardCornersSB(image: Mat, patternSize: Size, corners: Mat): boolean;
findChessboardCornersSB(image: Mat, patternSize: Size, corners: Mat, flags: number): boolean;
image

Source chessboard view. It must be an 8-bit grayscale or color image.

patternSize

Number of inner corners per a chessboard row and column ( patternSize = cv::Size(points_per_row,points_per_column) = cv::Size(columns,rows) ).

corners

Output destination, filled by the native operation. Output array of detected corners.

flags

Various operation flags that can be zero or a combination of the following values:

  • CALIB_CB_NORMALIZE_IMAGE Normalize the image gamma with equalizeHist before detection.
  • CALIB_CB_EXHAUSTIVE Run an exhaustive search to improve detection rate.
  • CALIB_CB_ACCURACY Up sample input image to improve sub-pixel accuracy due to aliasing effects.
  • CALIB_CB_LARGER The detected pattern is allowed to be larger than patternSize (see description).
  • CALIB_CB_MARKER The detected pattern must have a marker (see description). This should be used if an accurate camera calibration is required.
Returns

The boolean result.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.