sfm_relativeCameraMotion
import { sfm_relativeCameraMotion } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Computes the relative camera motion between two cameras.
sfm_relativeCameraMotion(R1: Mat, t1: Mat, R2: Mat, t2: Mat, R: Mat, t: Mat): void;R1Input 3x3 first camera rotation matrix.
t1Input 3x1 first camera translation vector.
R2Input 3x3 second camera rotation matrix.
t2Input 3x1 second camera translation vector.
ROutput destination, filled by the native operation. Output 3x3 relative rotation matrix.
tOutput destination, filled by the native operation. Output 3x1 relative translation vector.
Given the motion parameters of two cameras, computes the motion parameters of the second one assuming the first one to be at the origin. If T1 and T2 are the camera motions, the computed relative motion is
T = T_2 T_1^{-1}
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.