sfm_fundamentalFromCorrespondences7PointRobust
import { sfm_fundamentalFromCorrespondences7PointRobust } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Estimate robustly the fundamental matrix between two dataset of 2D point (image coords space).
sfm_fundamentalFromCorrespondences7PointRobust(x1: Mat, x2: Mat, max_error: number, F: Mat, inliers: Mat, outliers_probability: number): number;2 available overloads
sfm_fundamentalFromCorrespondences7PointRobust(x1: Mat, x2: Mat, max_error: number, F: Mat, inliers: Mat): number;sfm_fundamentalFromCorrespondences7PointRobust(x1: Mat, x2: Mat, max_error: number, F: Mat, inliers: Mat, outliers_probability: number): number;x1Input 2xN Array of 2D points in view 1.
x2Input 2xN Array of 2D points in view 2.
max_errormaximum error (in pixels).
FOutput destination, filled by the native operation. Output 3x3 fundamental matrix such that
x_2^T F x_1=0.inliersOutput destination, filled by the native operation. Output 1xN vector that contains the indexes of the detected inliers.
outliers_probabilityoutliers probability (in ]0,1[). The number of iterations is controlled using the following equation:
k = \frac{log(1-p)}{log(1.0 - w^n )}wherek,wandnare the number of iterations, the inliers ratio and minimun number of selected independent samples. The more this value is high, the less the function selects ramdom samples.The fundamental solver relies on the 7 point solution. Returns the best error (in pixels), associated to the solution F.
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.