[][src]Function opencv::calib3d::decompose_projection_matrix

pub fn decompose_projection_matrix(
    proj_matrix: &dyn ToInputArray,
    camera_matrix: &mut dyn ToOutputArray,
    rot_matrix: &mut dyn ToOutputArray,
    trans_vect: &mut dyn ToOutputArray,
    rot_matrix_x: &mut dyn ToOutputArray,
    rot_matrix_y: &mut dyn ToOutputArray,
    rot_matrix_z: &mut dyn ToOutputArray,
    euler_angles: &mut dyn ToOutputArray
) -> Result<()>

Decomposes a projection matrix into a rotation matrix and a camera matrix.

Parameters

  • projMatrix: 3x4 input projection matrix P.
  • cameraMatrix: Output 3x3 camera matrix K.
  • rotMatrix: Output 3x3 external rotation matrix R.
  • transVect: Output 4x1 translation vector T.
  • rotMatrixX: Optional 3x3 rotation matrix around x-axis.
  • rotMatrixY: Optional 3x3 rotation matrix around y-axis.
  • rotMatrixZ: Optional 3x3 rotation matrix around z-axis.
  • eulerAngles: Optional three-element vector containing three Euler angles of rotation in degrees.

The function computes a decomposition of a projection matrix into a calibration and a rotation matrix and the position of a camera.

It optionally returns three rotation matrices, one for each axis, and three Euler angles that could be used in OpenGL. Note, there is always more than one sequence of rotations about the three principal axes that results in the same orientation of an object, e.g. see Slabaugh . Returned tree rotation matrices and corresponding three Euler angles are only one of the possible solutions.

The function is based on RQDecomp3x3 .

C++ default parameters

  • rot_matrix_x: noArray()
  • rot_matrix_y: noArray()
  • rot_matrix_z: noArray()
  • euler_angles: noArray()