title: Making sense of decomposeProjectionMatrix
body: <p>The function decomposeProjectionMatrix() outputs a rotMatrix as well as rotMatrX, rotMatrY, and rotMatrz (as well as other quantities). </p>
  
  <p>My understanding was that rotMatrix = rotMatrX * rotMatrY * rotMatrZ (with * being the matrix multiplication operator). However, the results are not the case.</p>
  
  <p>Here is an example of the decomposition.</p>
  
  <pre><code># Decompose rotation vector using Rodridgues decomposition.
  self.rotation_matrix, _ = cv2.Rodrigues(self.rotation_vector)
  
  print("Rotation matrix returned from Rodrigues:\n", self.rotation_matrix)
  
  # Combine the rotation matrix and translation vector to create pose matrix.
  self.pose_matrix = cv2.hconcat((self.rotation_matrix, self.translation_vector))
  
  # Decompose pose matrix in various properties.
  properties = cv2.decomposeProjectionMatrix(self.pose_matrix)
  self.projection_matrix = properties[0]
  self.rot_matrix = properties[1]
  self.trans_vect = properties[2]
  self.rot_matrix_x = properties[3]
  self.rot_matrix_y = properties[4]
  self.rot_matrix_z = properties[5]
  self.euler_angles = properties[6]
  
  print("xyz\n",np.matmul(self.rot_matrix_x, np.matmul(self.rot_matrix_y, self.rot_matrix_z)))
  print()
  print("zyx\n",np.matmul(self.rot_matrix_z, np.matmul(self.rot_matrix_y, self.rot_matrix_x)))
  print()
  print("yxz\n",np.matmul(self.rot_matrix_y, np.matmul(self.rot_matrix_x, self.rot_matrix_z)))
  print()
  print(self.rot_matrix)
  </code></pre>
  
  <p>Here is an example of actual output:</p>
  
  <pre><code>Rotation matrix returned from Rodrigues:
   [[-0.00353424  0.99998718  0.00362615]
   [-0.145003   -0.00410033  0.98942272]
   [ 0.9894249   0.00297105  0.14501563]]
  xyz
   [[-0.00353424 -0.145003    0.9894249 ]
   [ 0.99998718 -0.00410033  0.00297105]
  [ 0.00362615  0.98942272  0.14501563]]
  
  zyx
   [[-0.00353424 -0.99899952 -0.04458098]
   [ 0.145003   -0.04462205  0.98842451]
   [-0.9894249  -0.00297105  0.14501563]]
  
  yxz
   [[-0.0237951  -0.14450917  0.98921731]
   [ 0.99949335 -0.02436119  0.02048349]
   [ 0.02113845  0.98920353  0.14501563]]
  
   [[-0.00353424  0.99998718  0.00362615]
   [-0.145003   -0.00410033  0.98942272]
   [ 0.9894249   0.00297105  0.14501563]]
  </code></pre>
  
  <p>We see that xyz or zyx does not give us back the rotation matrix! zyx almost gives us the right result, but there is a negative sign error!  What is the problem!?!? Thank you!</p>