Skip to content

aruco_drawDetectedDiamonds

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

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

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

Draw a set of detected ChArUco Diamond markers

aruco_drawDetectedDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat, borderColor: Scalar): void;
3 available overloads
aruco_drawDetectedDiamonds(image: Mat, diamondCorners: MatVector): void;
aruco_drawDetectedDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: Mat): void;
aruco_drawDetectedDiamonds(image: Mat, diamondCorners: MatVector, diamondIds: 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.

diamondCorners

positions of diamond corners in the same format returned by detectCharucoDiamond(). (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.

diamondIds

vector of identifiers for diamonds in diamondCorners, in the same format returned by detectCharucoDiamond() (e.g. std::vector<Vec4i>). 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.

Given an array of detected diamonds, this functions draws them 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.