findEssentialMat2
import { findEssentialMat2 } 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.
findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat, method: number, prob: number, threshold: number, mask: Mat): Mat;5 available overloads
findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat): Mat;findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat, method: number): Mat;findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat, method: number, prob: number): Mat;findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat, method: number, prob: number, threshold: number): Mat;findEssentialMat2(points1: Mat, points2: Mat, cameraMatrix1: Mat, distCoeffs1: Mat, cameraMatrix2: Mat, distCoeffs2: Mat, method: number, prob: number, threshold: number, mask: Mat): 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}.distCoeffs1Input vector of distortion coefficients for the first camera
(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.cameraMatrix2Camera matrix for the second camera
K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}.distCoeffs2Input vector of distortion coefficients for the second camera
(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.methodMethod for computing an essential matrix.
RANSACfor the RANSAC algorithm.LMEDSfor the LMedS algorithm.
probParameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.
thresholdParameter used for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise.
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.
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.