aruco_CharucoBoard
import { aruco_CharucoBoard } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits aruco_Board.
ChArUco board is a planar chessboard where the markers are placed inside the white squares of a chessboard.
The benefits of ChArUco boards is that they provide both, ArUco markers versatility and chessboard corner precision, which is important for calibration and pose estimation. The board image can be drawn using generateImage() method.
Constructors and members
static new
CharucoBoard constructor
new(size: Size, squareLength: number, markerLength: number, dictionary: aruco_Dictionary, ids: Mat): aruco_CharucoBoard;2 available overloads
new(size: Size, squareLength: number, markerLength: number, dictionary: aruco_Dictionary): aruco_CharucoBoard;new(size: Size, squareLength: number, markerLength: number, dictionary: aruco_Dictionary, ids: Mat): aruco_CharucoBoard;sizenumber of chessboard squares in x and y directions
squareLengthsquareLength chessboard square side length (normally in meters)
markerLengthmarker side length (same unit than squareLength)
dictionarydictionary of markers indicating the type of markers
idsarray of id used markers The first markers in the dictionary are used to fill the white chessboard squares.
The aruco_CharucoBoard result.
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
setLegacyPattern
set legacy chessboard pattern.
Legacy setting creates chessboard patterns starting with a white box in the upper left corner if there is an even row count of chessboard boxes, otherwise it starts with a black box. This setting ensures compatibility to patterns created with OpenCV versions prior OpenCV 4.6.0. See https://github.com/opencv/opencv/issues/23152.
Default value: false.
setLegacyPattern(legacyPattern: boolean): void;legacyPatternlegacy pattern argument (boolean).
getLegacyPattern
Read the legacy pattern.
set legacy chessboard pattern.
Legacy setting creates chessboard patterns starting with a white box in the upper left corner if there is an even row count of chessboard boxes, otherwise it starts with a black box. This setting ensures compatibility to patterns created with OpenCV versions prior OpenCV 4.6.0. See https://github.com/opencv/opencv/issues/23152.
Default value: false.
getLegacyPattern(): boolean;The boolean result.
getChessboardSize
Return the chessboard size configured on this aruco_CharucoBoard object.
getChessboardSize(): Size;The Size result.
getSquareLength
Return the square length configured on this aruco_CharucoBoard object.
getSquareLength(): number;The number result.
getMarkerLength
Return the marker length configured on this aruco_CharucoBoard object.
getMarkerLength(): number;The number result.
getChessboardCorners
get CharucoBoard::chessboardCorners
getChessboardCorners(): Point3fVector;The Point3fVector result. Release returned native handles with using or delete(), including handles nested in results.
checkCharucoCornersCollinear
check whether the ChArUco markers are collinear
checkCharucoCornersCollinear(charucoIds: Mat): boolean;charucoIdslist of identifiers for each corner in charucoCorners per frame.
bool value, 1 (true) if detected corners form a line, 0 (false) if they do not. solvePnP, calibration functions will fail if the corners are collinear (true).
The number of ids in charucoIDs should be <= the number of chessboard corners in the board. This functions checks whether the charuco corners are on a straight line (returns true, if so), or not (false). Axis parallel, as well as diagonal and other straight lines detected. Degenerate cases: for number of charucoIDs <= 2,the function returns true.
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.