sfm_motionFromEssentialChooseSolution
import { sfm_motionFromEssentialChooseSolution } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Choose one of the four possible motion solutions from an essential matrix.
sfm_motionFromEssentialChooseSolution(Rs: MatVector, ts: MatVector, K1: Mat, x1: Mat, K2: Mat, x2: Mat): number;RsInput vector of 3x3 rotation matrices.
tsInput vector of 3x1 translation vectors.
K1Input 3x3 first camera matrix
K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}.x1Input 2x1 vector with first 2d point.
K2Input 3x3 second camera matrix. The parameters are similar to K1.
x2Input 2x1 vector with second 2d point.
Decides the right solution by checking that the triangulation of a match x1--x2 lies in front of the cameras. Return index of the right solution or -1 if no solution.
Reference: See [HartleyZ00] 9.6 pag 259 (9.6.3 Geometrical interpretation of the 4 solutions).
The number result.
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.