findFundamentalMat2
import { findFundamentalMat2 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
example: samples/cpp/snippets/epipolar_lines.cpp An example using the findFundamentalMat function Calculates a fundamental matrix from the corresponding points in two images.
// Example. Estimation of fundamental matrix using the RANSAC algorithm
int point_count = 100;
vector<Point2f> points1(point_count);
vector<Point2f> points2(point_count);
// initialize the points here ...
for( int i = 0; i < point_count; i++ )
{
points1[i] = ...;
points2[i] = ...;
}
Mat fundamental_matrix =
findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);
findFundamentalMat2(points1: Mat, points2: Mat, mask: Mat, params: UsacParams): Mat;points1Array of N 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 .
maskOutput destination, filled by the native operation. optional output mask
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.