computeCorrespondEpilines
import { computeCorrespondEpilines } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
For points in an image of a stereo pair, computes the corresponding epilines in the other image.
computeCorrespondEpilines(points: Mat, whichImage: number, F: Mat, lines: Mat): void;pointsInput points.
N \times 1or1 \times Nmatrix of type CV_32FC2 or vector<Point2f> .whichImageIndex of the image (1 or 2) that contains the points .
FFundamental matrix that can be estimated using #findFundamentalMat or #stereoRectify .
linesOutput destination, filled by the native operation. Output vector of the epipolar lines corresponding to the points in the other image. Each line
ax + by + c=0is encoded by 3 numbers(a, b, c).For every point in one of the two images of a stereo pair, the function finds the equation of the corresponding epipolar line in the other image.
From the fundamental matrix definition (see #findFundamentalMat ), line
l^{(2)}_iin the second image for the pointp^{(1)}_iin the first image (when whichImage=1 ) is computed as:l^{(2)}_i = F p^{(1)}_iAnd vice versa, when whichImage=2,
l^{(1)}_iis computed fromp^{(2)}_ias:l^{(1)}_i = F^T p^{(2)}_iLine coefficients are defined up to a scale. They are normalized so that
a_i^2+b_i^2=1.
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.