Skip to content

filterHomographyDecompByVisibleRefpoints

geometryfunctionOpenCV 5.0.0
import { filterHomographyDecompByVisibleRefpoints } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSrotations, normals, beforePoints, afterPoints
FUNCTIONfilterHomographyDecompByVisibleRefpoints
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Filters homography decompositions based on additional information.

filterHomographyDecompByVisibleRefpoints(rotations: MatVector, normals: MatVector, beforePoints: Mat, afterPoints: Mat, possibleSolutions: Mat, pointsMask: Mat): void;
2 available overloads
filterHomographyDecompByVisibleRefpoints(rotations: MatVector, normals: MatVector, beforePoints: Mat, afterPoints: Mat, possibleSolutions: Mat): void;
filterHomographyDecompByVisibleRefpoints(rotations: MatVector, normals: MatVector, beforePoints: Mat, afterPoints: Mat, possibleSolutions: Mat, pointsMask: Mat): void;
rotations

Vector of rotation matrices.

normals

Vector of plane normal matrices.

beforePoints

Vector of (rectified) visible reference points before the homography is applied

afterPoints

Vector of (rectified) visible reference points after the homography is applied

possibleSolutions

Output destination, filled by the native operation. Vector of int indices representing the viable solution set after filtering

pointsMask

optional Mat/Vector of CV_8U, CV_8S or CV_Bool type representing the mask for the inliers as given by the #findHomography function

This function is intended to filter the output of the #decomposeHomographyMat based on additional information as described in [Malis2007] . The summary of the method: the #decomposeHomographyMat function returns 2 unique solutions and their "opposites" for a total of 4 solutions. If we have access to the sets of points visible in the camera frame before and after the homography transformation is applied, we can determine which are the true potential solutions and which are the opposites by verifying which homographies are consistent with all visible reference points being in front of the camera. The inputs are left unchanged; the filtered solution set is returned as indices into the existing one.

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.