aruco_CharucoDetector
import { aruco_CharucoDetector } 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 Algorithm.
aruco charuco detector value in the OpenCV API.
Constructors and members
static new
Basic CharucoDetector constructor
new(board: aruco_CharucoBoard, charucoParams: aruco_CharucoParameters, detectorParams: aruco_DetectorParameters, refineParams: aruco_RefineParameters): aruco_CharucoDetector;4 available overloads
new(board: aruco_CharucoBoard): aruco_CharucoDetector;new(board: aruco_CharucoBoard, charucoParams: aruco_CharucoParameters): aruco_CharucoDetector;new(board: aruco_CharucoBoard, charucoParams: aruco_CharucoParameters, detectorParams: aruco_DetectorParameters): aruco_CharucoDetector;new(board: aruco_CharucoBoard, charucoParams: aruco_CharucoParameters, detectorParams: aruco_DetectorParameters, refineParams: aruco_RefineParameters): aruco_CharucoDetector;boardChAruco board
charucoParamscharuco detection parameters
detectorParamsmarker detection parameters
refineParamsmarker refine detection parameters
The aruco_CharucoDetector 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.
getBoard
Return the board configured on this aruco_CharucoDetector object.
getBoard(): aruco_CharucoBoard;The aruco_CharucoBoard result.
setBoard
Set the board used by this aruco_CharucoDetector object.
setBoard(board: aruco_CharucoBoard): void;boardboard argument (aruco_CharucoBoard).
getCharucoParameters
Return the charuco parameters configured on this aruco_CharucoDetector object.
getCharucoParameters(): aruco_CharucoParameters;The aruco_CharucoParameters result.
setCharucoParameters
Set the charuco parameters used by this aruco_CharucoDetector object.
setCharucoParameters(charucoParameters: aruco_CharucoParameters): void;charucoParameterscharuco parameters argument (aruco_CharucoParameters).
getDetectorParameters
Return the detector parameters configured on this aruco_CharucoDetector object.
getDetectorParameters(): aruco_DetectorParameters;The aruco_DetectorParameters result.
setDetectorParameters
Set the detector parameters used by this aruco_CharucoDetector object.
setDetectorParameters(detectorParameters: aruco_DetectorParameters): void;detectorParametersdetector parameters argument (aruco_DetectorParameters).
getRefineParameters
Return the refine parameters configured on this aruco_CharucoDetector object.
getRefineParameters(): aruco_RefineParameters;The aruco_RefineParameters result.
setRefineParameters
Set the refine parameters used by this aruco_CharucoDetector object.
setRefineParameters(refineParameters: aruco_RefineParameters): void;refineParametersrefine parameters argument (aruco_RefineParameters).
detectBoard
detect aruco markers and interpolate position of ChArUco board corners
See: findChessboardCorners
Note: After OpenCV 4.6.0, there was an incompatible change in the ChArUco pattern generation algorithm for even row counts. Use cv::aruco::CharucoBoard::setLegacyPattern() to ensure compatibility with patterns created using OpenCV versions prior to 4.6.0. For more information, see the issue: https://github.com/opencv/opencv/issues/23152
detectBoard(image: Mat, charucoCorners: Mat, charucoIds: Mat, markerCorners: MatVector, markerIds: Mat): void;3 available overloads
detectBoard(image: Mat, charucoCorners: Mat, charucoIds: Mat): void;detectBoard(image: Mat, charucoCorners: Mat, charucoIds: Mat, markerCorners: MatVector): void;detectBoard(image: Mat, charucoCorners: Mat, charucoIds: Mat, markerCorners: MatVector, markerIds: Mat): void;imageinput image necessary for corner refinement. Note that markers are not detected and should be sent in corners and ids parameters.
charucoCornersOutput destination, filled by the native operation. interpolated chessboard corners.
charucoIdsOutput destination, filled by the native operation. interpolated chessboard corners identifiers.
markerCornersInput/output value, modified by the native operation. vector of already detected markers corners. For each marker, its four corners are provided, (e.g std::vector<std::vectorcv::Point2f > ). For N detected markers, the dimensions of this array should be Nx4. The order of the corners should be clockwise. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdsInput/output value, modified by the native operation. list of identifiers for each marker in corners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
This function receives the detected markers and returns the 2D position of the chessboard corners from a ChArUco board using the detected Aruco markers.
If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography. Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
detectDiamonds
Detect ChArUco Diamond markers
detectDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat, markerCorners: MatVector, markerIds: Mat): void;3 available overloads
detectDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat): void;detectDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat, markerCorners: MatVector): void;detectDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat, markerCorners: MatVector, markerIds: Mat): void;imageinput image necessary for corner subpixel.
diamondCornersOutput destination, filled by the native operation. output list of detected diamond corners (4 corners per diamond). The order is the same than in marker corners: top left, top right, bottom right and bottom left. Similar format than the corners returned by detectMarkers (e.g std::vector<std::vectorcv::Point2f > ).
diamondIdsOutput destination, filled by the native operation. ids of the diamonds in diamondCorners. The id of each diamond is in fact of type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the diamond.
markerCornersInput/output value, modified by the native operation. list of detected marker corners from detectMarkers function. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
markerIdsInput/output value, modified by the native operation. list of marker ids in markerCorners. If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
This function detects Diamond markers from the previous detected ArUco markers. The diamonds are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters are provided, the diamond search is based on reprojection. If not, diamond search is based on homography. Homography is faster than reprojection, but less accurate.
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.