solvePnP: Obtaining the rotation translation matrix

2.6k Views Asked by At

I am trying to image coordinates to 3D coordinates. Using the solvePnP function (in C++)has given me 3X1 rotation matrix and 3X1 translation matrix. But isn't the [R|t] matrix supposed to be 3X4?

Any help will be greatly appreciated!

1

There are 1 best solutions below

1
On BEST ANSWER

From the OpenCV documentation for solvePnP:

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

Following the link to Rodrigues():

  • src – Input rotation vector (3x1 or 1x3) or rotation matrix (3x3).
  • dst – Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively.