Skip to content

aruco_drawDetectedMarkers

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

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

ARGUMENTSimage, corners, ids, borderColor
FUNCTIONaruco_drawDetectedMarkers
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Draw detected markers in image

aruco_drawDetectedMarkers(image: Mat, corners: MatVector, ids: Mat, borderColor: Scalar): void;
3 available overloads
aruco_drawDetectedMarkers(image: Mat, corners: MatVector): void;
aruco_drawDetectedMarkers(image: Mat, corners: MatVector, ids: Mat): void;
aruco_drawDetectedMarkers(image: Mat, corners: MatVector, ids: Mat, borderColor: Scalar): void;
image

Input/output value, modified by the native operation. input/output image. It must have 1 or 3 channels. The number of channels is not altered.

corners

positions of marker corners on input image. (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.

ids

vector of identifiers for markers in markersCorners . Optional, if not provided, ids are not painted.

borderColor

color of marker borders. Rest of colors (text color and first corner color) are calculated based on this one to improve visualization.

Given an array of detected marker corners and its corresponding ids, this functions draws the markers in the image. The marker borders are painted and the markers identifiers if provided. Useful for debugging purposes.

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.