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

Revision history [back]

click to hide/show revision 1
initial version

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

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)

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

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

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 wrong since camera matrix changes after rectification).rectification).