Skip to content

sfm_relativeCameraMotion

sfmfunctionOpenCV 5.0.0
import { sfm_relativeCameraMotion } from '@banou/opencv-wasm'

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

ARGUMENTSR1, t1, R2, t2
FUNCTIONsfm_relativeCameraMotion
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Computes the relative camera motion between two cameras.

sfm_relativeCameraMotion(R1: Mat, t1: Mat, R2: Mat, t2: Mat, R: Mat, t: Mat): void;
R1

Input 3x3 first camera rotation matrix.

t1

Input 3x1 first camera translation vector.

R2

Input 3x3 second camera rotation matrix.

t2

Input 3x1 second camera translation vector.

R

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

t

Output 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.