camera_calibration: Projection matrix and camera matrix not the same.
I did a calibration of a monocular camera. These two wiki pages were my references for the interpretation of the results
[1] http://docs.ros.org/api/sensor_msgs/h...
[2] http://wiki.ros.org/image_pipeline/Ca...
The camera matrix K is:
[fx 0 cx]
K = [ 0 fy cy]
[ 0 0 1]
And the projection matrix P:
[fx' 0 cx' Tx]
P = [ 0 fy' cy' Ty]
[ 0 0 1 0]
In [1], it is written that for monocular cameras with R being the identity, P[1:3,1:3] will usually be equal to K, because Tx = Ty = 0. Now I have made a simple monocular camera calibration with the standard camera calibration package from ROS ( http://wiki.ros.org/camera_calibration ). As you can see, my camera matrix and my projection matrix look quite different:
image_width: 1288
image_height: 964
camera_name: camera
camera_matrix:
rows: 3
cols: 3
data: [598.930216, 0, 659.737942, 0, 603.682487, 466.347353, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.220999, 0.03075, -0.00239, -0.001594, 0]
rectification_matrix:
rows: 3
cols: 3
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
rows: 3
cols: 4
data: [394.463257, 0, 644.75279, 0, 0, 491.095154, 450.103389, 0, 0, 0, 1, 0]
Also, I realized that the projection matrix changes if I am changing the 'scale' parameter inside the camera calibrator, I read something about region of interest, but I didn't find this parameter anywhere.
My setup is the following: I am searching AR markers on the undistorted image (image_rect using image_proc package). ARToolKit needs a projection matrix in order to compute the 3D transforms of the found markers, so I think it needs to know P. Furthermore, I do a back-projection of some estimated markers and get pixel coordinates, so I use also P for this (as I want the projection onto the rectified image). So, as it is described in [2], image_proc uses K - D - R - K' in order to get me the undistorted image. Is it right, that I can only use P subsequently when I only operate on the undistorted image (marker search and back-projection), as I do it now?
Can someone tell me how the projection matrix is computed? Or K'?