Obtaining the Extrinsic Matrix of a Camera

Hello, I try to learn camera calibration. I used cv::calibrateCamera to obtain intrinsic camera matrix, distortion coefficients, rotation vectors, and translation vectors. How do I get the extrinsic matrix for that camera? I learned that I need to find a rotation matrix and translation matrix to build an extrinsic matrix but cv::calibrateCamera gives me rotation vector and translation vector for each calibration image, as a result, if I use cv::Rodriguez I get rotation matrices for each calibration image.

How do I create one P = [R | t] for my camera?

1 Like

Some questions you should try to answer:

  • what is the intrinsic matrix, with an emphasis on the intrinsic term
  • what is the extrinsic matrix, and more specifically what the coordinates frame drawn on calibration images represents
  • what is the purpose of stereo cameras, and why you need two cameras/eyes to sense the world

Use this code:

Rt = np.concatenate([R,t], axis=-1)
P = np.matmul(intrinsic_matrix,Rt)

For someone finding this topic, there are plenty of resources on the net:

@Eduardo , so what do you mean that is not possible to obtain the extrinsic matrix from a single camera and the camera calibration method? I had the same exact doubt from @lightbringer , and I was expecting to get the camera angles and height from the camera calibration.