# How to get the projection matrix from odometry/tf data?

I would like to compare my results of visual Odometry with the groundtruth provided by the KITTI dataset. For each frame in the groundthruth, i have a projection matrix. For example:

1.000000e+00 9.043683e-12 2.326809e-11 1.110223e-16 9.043683e-12 1.000000e+00 2.392370e-10 2.220446e-16 2.326810e-11 2.392370e-10 9.999999e-01 -2.220446e-16


Here the instructions provided by the readme:

Row i represents the i'th pose of the left camera coordinate system (i.e., z pointing forwards) via a 3x4 transformation matrix. The matrices are stored in row aligned order (the first entries correspond to the first row), and take a point in the i'th coordinate system and project it into the first (=0th) coordinate system. Hence, the translational part (3x1 vector of column 4) corresponds to the pose of the left camera coordinate system in the i'th frame with respect to the first (=0th) frame

But I don't know how to produce the same kind of data for me. What I have for each frame in my case:

• The Tf transformation from the init_camera (the fix one from the (0,0,0)) to the left camera which is moving. So I have the translation vector and the quaternion rotation.
• The odometry data: the pose and the twist
• Camera calibration parameters

With those data, How I compare with the groundtruth ? So I need to find the projection matrix from the data above but don't know how to do it.

Can someone help me ?

Thank

• I do not understand your question. Seems like you are trying to compare your own odometry algorithm with something - but with what? You could compare it for instance to KITTI GPS data (which can be considered as an odometry ground-truth probably) to see how your odometry performs. Seems to me that you are trying to compare your odometry algorithm to the LIBVISO2 output over the same input data (mono/stereo sequence), which you of course can do too... it really depends on what you need to do. – Kozuch Apr 20 '15 at 10:10
• PS. The projection matrix is the result of LIBVISO library - you need to feed the library with image data and it will output the matrix. In the matrix the last column are the x,y,z deltas to the previous frame (if I recall correctly). – Kozuch Apr 20 '15 at 10:13
• Thank for your answer. Actually no I don't want to compare LIBVISO but this one: [link](cvlibs.net/datasets/kitti/… ) to the ground truth provided by the KITTI Benchmark but the problem is in their groundtruth I have for each frame the projection matrix of the camera (3x4) but me, as an result of the algorithm I test, I can only have what I said above...That's the main difficulty for me. – lilouch Apr 21 '15 at 0:54