[][src]Function opencv::calib3d::filter_homography_decomp_by_visible_refpoints

pub fn filter_homography_decomp_by_visible_refpoints(
    rotations: &dyn ToInputArray,
    normals: &dyn ToInputArray,
    before_points: &dyn ToInputArray,
    after_points: &dyn ToInputArray,
    possible_solutions: &mut dyn ToOutputArray,
    points_mask: &dyn ToInputArray
) -> Result<()>

Filters homography decompositions based on additional information.

Parameters

  • 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: Vector of int indices representing the viable solution set after filtering
  • pointsMask: optional Mat/Vector of 8u 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 Malis . 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.

C++ default parameters

  • points_mask: noArray()