I working with other dataset (no kitti), but I need to convert it in kitti dataset format. I can't understand how calibration matrices were calculated in kitti. Example:
camera 2 (P2) calibration matrix from calib.txt:
[718.856 0 607.1928 -386.1448]
[ 0 718.856 185.2157 0 ]
[ 0 0 1 0 ]
I know, that
[718.856 0 607.1928]
[ 0 718.856 185.2157]
[ 0 0 1 ]
-- are K - camera intrinsic. But what the last column mean?
I suggested, that it's an offset from 0-th camera, measured in pixels. From kitti sensor setup, I know that Cam 2 offsets from Cam 0 for 0.06m negatively by axis X. Camera pixel size is 4.65um. But
0.06[m] / (4.65 * 10^(-6)[m]) != 386.1448 [pixels]
So what does the last column mean? And how to calculate calibration matrix just like in kitti.
According to the file calib_cam_to_cam.txt(calib_time: 09-Jan-2012 14:00:15) provided on Kitti Website - http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d, the above mentioned matrix is for Camera 01(P_rect_01). As mentioned in the paper Vision meets Robotics: The KITTI Dataset by Andreas Geiger, Philip Lenz, Christoph Stiller and Raquel Urtasun(Section IV B - camera calibration), projection matrix for i-th camera -
P(i)rect = [[fu 0 cx -fu*bx],
[0 fv cy 0],
[0 0 1 0]]
where, bx is the baseline in meters w.r.t. the reference camera 0. The sensor setup as shown on Kitti website - http://www.cvlibs.net/datasets/kitti/setup.php indicates baseline between cam 3 and cam 2 is 0.54m and baseline between cam 0 and cam 2, and cam 1 and cam 3 is 0.06m.
Now, -fu*bx/fu = -386.1448/718.856 ~= -0.537165 ~= -0.54 (B3-2 - B2-0 + B1-3 = B1-0)