sfm_KRtFromProjection
import { sfm_KRtFromProjection } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSP, K, R, t
FUNCTIONsfm_KRtFromProjection
RETURN TYPEvoid
Get K, R and t from projection matrix P, decompose using the RQ decomposition.
sfm_KRtFromProjection(P: Mat, K: Mat, R: Mat, t: Mat): void;PInput 3x4 projection matrix.
KOutput destination, filled by the native operation. Output 3x3 camera matrix
K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}.ROutput destination, filled by the native operation. Output 3x3 rotation matrix.
tOutput destination, filled by the native operation. Output 3x1 translation vector.
Reference: [HartleyZ00] A4.1.1 pag.579
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.