Skip to content

drawFrameAxes

Image processingfunctionOpenCV 5.0.0
import { drawFrameAxes } from '@banou/opencv-wasm'

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

ARGUMENTSimage, cameraMatrix, distCoeffs, rvec
FUNCTIONdrawFrameAxes
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Draw axes of the world/object coordinate system from pose estimation. See: solvePnP

drawFrameAxes(image: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, length: number, thickness: number): void;
2 available overloads
drawFrameAxes(image: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, length: number): void;
drawFrameAxes(image: Mat, cameraMatrix: Mat, distCoeffs: Mat, rvec: Mat, tvec: Mat, length: number, thickness: number): 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.

cameraMatrix

Input 3x3 floating-point matrix of camera intrinsic parameters. \cameramatrix{A}

distCoeffs

Input vector of distortion coefficients \distcoeffs. If the vector is empty, the zero distortion coefficients are assumed.

rvec

Rotation vector (see Rodrigues ) that, together with tvec, brings points from the model coordinate system to the camera coordinate system.

tvec

Translation vector.

length

Length of the painted axes in the same unit than tvec (usually in meters).

thickness

Line thickness of the painted axes.

This function draws the axes of the world/object coordinate system w.r.t. to the camera frame. OX is drawn in red, OY in green and OZ in blue.

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.