filterHomographyDecompByVisibleRefpoints
import { filterHomographyDecompByVisibleRefpoints } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;rotationsVector of rotation matrices.
normalsVector of plane normal matrices.
beforePointsVector of (rectified) visible reference points before the homography is applied
afterPointsVector of (rectified) visible reference points after the homography is applied
possibleSolutionsOutput destination, filled by the native operation. Vector of int indices representing the viable solution set after filtering
pointsMaskoptional 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.