Skip to content

RQDecomp3x3

geometryfunctionOpenCV 5.0.0
import { RQDecomp3x3 } from '@banou/opencv-wasm'

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

ARGUMENTSsrc, mtxR, mtxQ, Qx
FUNCTIONRQDecomp3x3
RETURN TYPEVec3d
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Computes an RQ decomposition of 3x3 matrices.

RQDecomp3x3(src: Mat, mtxR: Mat, mtxQ: Mat, Qx: Mat, Qy: Mat, Qz: Mat): Vec3d;
4 available overloads
RQDecomp3x3(src: Mat, mtxR: Mat, mtxQ: Mat): Vec3d;
RQDecomp3x3(src: Mat, mtxR: Mat, mtxQ: Mat, Qx: Mat): Vec3d;
RQDecomp3x3(src: Mat, mtxR: Mat, mtxQ: Mat, Qx: Mat, Qy: Mat): Vec3d;
RQDecomp3x3(src: Mat, mtxR: Mat, mtxQ: Mat, Qx: Mat, Qy: Mat, Qz: Mat): Vec3d;
src

3x3 input matrix.

mtxR

Output destination, filled by the native operation. Output 3x3 upper-triangular matrix.

mtxQ

Output destination, filled by the native operation. Output 3x3 orthogonal matrix.

Qx

Output destination, filled by the native operation. Optional output 3x3 rotation matrix around x-axis.

Qy

Output destination, filled by the native operation. Optional output 3x3 rotation matrix around y-axis.

Qz

Output destination, filled by the native operation. Optional output 3x3 rotation matrix around z-axis.

The function computes a RQ decomposition using the given rotations. This function is used in #decomposeProjectionMatrix to decompose the left 3x3 submatrix of a projection matrix into a camera and a rotation matrix.

It optionally returns three rotation matrices, one for each axis, and the three Euler angles in degrees (as the return value) that could be used in OpenGL. Note, there is always more than one sequence of rotations about the three principal axes that results in the same orientation of an object, e.g. see [Slabaugh] . Returned three rotation matrices and corresponding three Euler angles are only one of the possible solutions.

Returns

The Vec3d result.

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.