findEssentialMat3
import { findEssentialMat3 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Calculates an essential matrix from the corresponding points in two images from potentially two different cameras.
findEssentialMat3(points1: Mat, points2: Mat, cameraMatrix1: Mat, cameraMatrix2: Mat, dist_coeff1: Mat, dist_coeff2: Mat, mask: Mat, params: UsacParams): Mat;points1Array of N (N >= 5) 2D points from the first image. The point coordinates should be floating-point (single or double precision).
points2Array of the second image points of the same size and format as points1.
cameraMatrix1Camera matrix for the first camera
K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}.cameraMatrix2Camera matrix for the second camera
K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}.dist_coeff1dist coeff1 argument (Mat).
dist_coeff2dist coeff2 argument (Mat).
maskOutput destination, filled by the native operation. Output array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods.
This function estimates essential matrix based on the five-point algorithm solver in [Nister03] . [SteweniusCFS] is also a related. The epipolar geometry is described by the following equation:
[p_2; 1]^T K^{-T} E K^{-1} [p_1; 1] = 0where
Eis an essential matrix,p_1andp_2are corresponding points in the first and the second images, respectively. The result of this function may be passed further to #decomposeEssentialMat or #recoverPose to recover the relative pose between cameras.paramsparams argument (UsacParams).
The Mat result. Release returned native handles with using or delete(), including handles nested in results.
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.