Camera Calibration with OpenCV: Using the distortion and rotation-translation matrix

940 Views Asked by At

I am reading the following documentation: http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

I have managed to successfully calibrate the camera obtaining the camera matrix and the distortion matrix.

I had two sub-questions:

1) How do I use the distortion matrix as I don't know 'r'?

Formula to get corrected coordinates

2) For all the views I have the rotation and translation vectors which transform the object points (given in the model coordinate space) to the image points (given in the world coordinate space). So a total of 6 coordinates per image(3 rotational, 3 translational). How do I make use of this information to obtain the rotational-translational matrix?

Any help would be appreciated. Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Answers in order:

1) "r" is the pixel's radius with respect to the distortion center. That is:

r = sqrt((x - x_c)^2 + (y - y_c)^2)

where (x_c, y_c) is the center of the nonlinear distortion (i.e. the point in the image that has zero nonlinear distortion. This is usually (and approximately) identified with the principal point, i.e. the intersection of the camera focal axis with the image plane. The coordinates of the principal point are in the 3rd column of the matrix of the camera intrinsic paramers.

2) Use Rodrigues's formula to convert between rotation vectors and rotation matrices.