correctMatches
import { correctMatches } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Refines coordinates of corresponding points.
correctMatches(F: Mat, points1: Mat, points2: Mat, newPoints1: Mat, newPoints2: Mat): void;F3x3 fundamental matrix.
points11xN array containing the first set of points.
points21xN array containing the second set of points.
newPoints1Output destination, filled by the native operation. The optimized points1.
newPoints2Output destination, filled by the native operation. The optimized points2.
The function implements the Optimal Triangulation Method (see Multiple View Geometry [HartleyZ00] for details). For each given point correspondence points1[i] <-> points2[i], and a fundamental matrix F, it computes the corrected correspondences newPoints1[i] <-> newPoints2[i] that minimize the geometric error
d(points1[i], newPoints1[i])^2 + d(points2[i],newPoints2[i])^2(whered(a,b)is the geometric distance between pointsaandb) subject to the epipolar constraintnewPoints2^T \cdot F \cdot newPoints1 = 0.
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.