ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
 Ask Your Question

# About the camera calibration parameters

Hi, I have been looking at the camera calibration parameters generated during the calibration and the explanation of the cameraInfo parameters in the ROS wiki.

I can't figure out what the K' matrix is and how the projection matrix is obtained. I thought it would be given by P=K*R but the math doesn't add up.

Thanks!

edit retag close merge delete

## 3 Answers

Sort by ยป oldest newest most voted

The CameraInfo message definition describes each of the parameters in great detail.

more

1) The K matrix is "normal" camera matrix that you know.

2) The P matrix however, is not the Projection matrix. It is the new camera matrix if you have rectified an image using rectifyImage(). See this source code, for the member function fx() of image_geometry::PinholeCamera class. Notice how it is accessing the P matrix to return the focal length (and centre of projection)

3) I had run into this trouble recently when rectifying images because I was accessing the K matrix using fullIntrinsicMatrix() function after rectifying the image (which is wrong since camera matrix changes after rectification).

more

## Comments

Can you tell me what the values will be when the stereo camera already transmits rectified images? Please see the details here

( 2019-01-09 15:17:46 -0600 )edit

Great! But my calibration result of a monocular camera gives different camera matrix K and projection matrix P:

image_width: 1280
image_height: 720
camera_name: head_camera
camera_matrix:
rows: 3
cols: 3
data: [1191.684030513793, 0, 612.2327036330117, 0, 1190.477585826093, 386.1943923951908, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.4279928528758908, 0.2098535466268812, 0.001734967304558237, -0.0001708439997913541, 0]
rectification_matrix:
rows: 3
cols: 3
data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
rows: 3
cols: 4
data: [1030.564331054688, 0, 602.9148174812726, 0, 0, 1139.198486328125, 388.5892694416107, 0, 0, 0, 1, 0]


which makes me confused...

more

## Stats

Asked: 2013-11-19 00:26:50 -0600

Seen: 1,888 times

Last updated: Jun 17 '18