How to convert Opencv single camera calibration matrix to Kitti format?

316 Views Asked by At

I am working with monocular 3D object detection. The GitHub repository uses the Kitti dataset and Kitti calibration matrix. P_rect_02 matrix from "calib_cam_to_cam.txt":

[ 718 0 607 45.3]  
[ 0 718 185 -0.113]  
[ 0  0   1  0.00377]

Now, I have one RGB camera, and using OpenCV camera calibration method (chessboard), I calculated the intrinsic matrix:

[803 0 529]  
[0 811 413]  
[0 0  1]

I also have a 3x1 rotational vector and a 3x1 translation vector. How can I convert my findings to the Kitti format? Kitti has stereo camera and according to the original paper, the projection matrix is:

[fu 0  cx  -fu*bx]  
[0  fv  cy -fv*by]  
[0   0   1  0]

where bx, by are distances between different cameras with respect to camera 0. I have only one camera. In that case, I do not have those distances. If I use 0 in the last column, the performance degrades.

Edit: Since only one RGB camera exists, 'bx' and 'by' will be 0 and the rests are the same as the intrinsic matrix. This gave me a fairly accurate result.

0

There are 0 best solutions below