Ask Your Question

Revision history [back]

I think that what you doing wrong is considering that these angles are actually the exact values for roll, yaw & pitch. Looking at the documentation, the description states:

rvec – Output rotation vector (see Rodrigues() ) that, together with tvec , brings points from the model coordinate system to the camera coordinate system.

tvec – Output translation vector.

This means that for each point you have in your model, you can switch to the camera coördinate system. However, this is NOT the world coördinate system. I think you should still do a second operation to transfer between the camera coordinate system and the world coordinate system.

Maybe take a look at some topics that do exactly what you want, retrieving pitch yaw and roll.

  1. http://www.morethantechnical.com/2010/03/19/quick-and-easy-head-pose-estimation-with-opencv-w-code/
  2. http://planning.cs.uiuc.edu/node103.html