What are the focal lengths and the principal point in KITTI stereo dataset?

Viewed 5018

I am using the KITTI stereo dataset 2012 and 2015 in a research.

But I need some values that I didn't find:

  1. focal lengths for x and y direction.
  2. the principal point.

There are some files inside the "calib" folder in dataset. A content example is here (calib/000000.txt):

P0: 7.070912e+02 0.000000e+00 6.018873e+02 0.000000e+00 0.000000e+00 7.070912e+02 1.831104e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00

P1: 7.070912e+02 0.000000e+00 6.018873e+02 -3.798145e+02 0.000000e+00 7.070912e+02 1.831104e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00

P2: 7.070912e+02 0.000000e+00 6.018873e+02 4.688783e+01 0.000000e+00 7.070912e+02 1.831104e+02 1.178601e-01 0.000000e+00 0.000000e+00 1.000000e+00 6.203223e-03

P3: 7.070912e+02 0.000000e+00 6.018873e+02 -3.334597e+02 0.000000e+00 7.070912e+02 1.831104e+02 1.930130e+00 0.000000e+00 0.000000e+00 1.000000e+00 3.318498e-03

Following this paper (specifically in section IV, B): http://www.mrt.kit.edu/z/publ/download/2013/GeigerAl2013IJRR.pdf

I got that P is the projection matrix after retification. And i ∈ {0, 1, 2, 3} is the camera index, where 0 represents the left grayscale, 1 the right grayscale, 2 the left color and 3 the right color camera.

But my problem is that I don't know how to find the focal length and the principal point that I need.

Can someone help me?

Thank you all!

3 Answers

The only values that I have been able to find are this;

// calibration parameters for sequence 2010_03_09_drive_0019
param.calib.f  = 645.24;    // focal length in pixels
param.calib.cu = 635.96;    // principal point (u-coordinate) in pixels
param.calib.cv = 194.13;    // principal point (v-coordinate) in pixels
param.base = 0.5707;        // baseline in meters

From; https://github.com/pangfumin/libviso2/blob/master/src/demo.cpp~

You should be able to find the answers to all your calibration questions in the pyKitti repository.

Copy pasting the relevant lines:

# Get calibration data from .txt file
P_rect_00 = np.reshape(filedata['P0'], (3, 4))
# Compute the camera intrinsics
data['K_cam0'] = P_rect_00[0:3, 0:3]

Note that the frames for the odometry dataset are already rectified.

Related