decomposeProjectionMatrix
import { decomposeProjectionMatrix } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix.
decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat, rotMatrixX: Mat, rotMatrixY: Mat, rotMatrixZ: Mat, eulerAngles: Mat): void;5 available overloads
decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat): void;decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat, rotMatrixX: Mat): void;decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat, rotMatrixX: Mat, rotMatrixY: Mat): void;decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat, rotMatrixX: Mat, rotMatrixY: Mat, rotMatrixZ: Mat): void;decomposeProjectionMatrix(projMatrix: Mat, cameraMatrix: Mat, rotMatrix: Mat, transVect: Mat, rotMatrixX: Mat, rotMatrixY: Mat, rotMatrixZ: Mat, eulerAngles: Mat): void;projMatrix3x4 input projection matrix P.
cameraMatrixOutput destination, filled by the native operation. Output 3x3 camera intrinsic matrix
\cameramatrix{A}.rotMatrixOutput destination, filled by the native operation. Output 3x3 external rotation matrix R.
transVectOutput destination, filled by the native operation. Output 4x1 translation vector T.
rotMatrixXOutput destination, filled by the native operation. Optional 3x3 rotation matrix around x-axis.
rotMatrixYOutput destination, filled by the native operation. Optional 3x3 rotation matrix around y-axis.
rotMatrixZOutput destination, filled by the native operation. Optional 3x3 rotation matrix around z-axis.
eulerAnglesOutput destination, filled by the native operation. Optional three-element vector containing three Euler angles of rotation in degrees.
The function computes a decomposition of a projection matrix into a calibration and a rotation matrix and the position of a camera.
It optionally returns three rotation matrices, one for each axis, and three Euler angles 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.
The function is based on #RQDecomp3x3 .
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.