[][src]Function opencv::calib3d::decompose_homography_mat

pub fn decompose_homography_mat(
    h: &dyn ToInputArray,
    k: &dyn ToInputArray,
    rotations: &mut dyn ToOutputArray,
    translations: &mut dyn ToOutputArray,
    normals: &mut dyn ToOutputArray
) -> Result<i32>

Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).

Parameters

  • H: The input homography matrix between two images.
  • K: The input intrinsic camera calibration matrix.
  • rotations: Array of rotation matrices.
  • translations: Array of translation matrices.
  • normals: Array of plane normal matrices.

This function extracts relative camera motion between two views observing a planar object from the homography H induced by the plane. The intrinsic camera matrix K must also be provided. The function may return up to four mathematical solution sets. At least two of the solutions may further be invalidated if point correspondences are available by applying positive depth constraint (all points must be in front of the camera). The decomposition method is described in detail in Malis .