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

About the camera calibration parameters

asked 2013-11-19 00:26:50 -0500

sofiad gravatar image

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 flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2013-11-19 04:12:56 -0500

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

edit flag offensive delete link more
0

answered 2018-06-17 23:40:37 -0500

malharjajoo gravatar image

updated 2018-06-17 23:41:11 -0500

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).

edit flag offensive delete link more

Comments

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

Avner gravatar image Avner  ( 2019-01-09 15:17:46 -0500 )edit
0

answered 2015-11-16 21:02:50 -0500

taogashi gravatar image

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...

edit flag offensive delete link more

Question Tools

3 followers

Stats

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

Seen: 1,921 times

Last updated: Jun 17 '18