sfm_computeOrientation
import { sfm_computeOrientation } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Computes Absolute or Exterior Orientation (Pose Estimation) between 2 sets of 3D point.
sfm_computeOrientation(x1: MatVector, x2: MatVector, R: Mat, t: Mat, s: number): void;x1Input first 3xN or 2xN array of points.
x2Input second 3xN or 2xN array of points.
ROutput destination, filled by the native operation. Output 3x3 computed rotation matrix.
tOutput destination, filled by the native operation. Output 3x1 computed translation vector.
sOutput computed scale factor.
Find the best transformation such that xp=projection*(sRx+t) (same as Pose Estimation, ePNP). The routines below are only for the orthographic case for now.
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.