KITTI校准文件中的参数格式 [英] Format of parameters in KITTI's calibration file
问题描述
我从 KITTI的部分里程表中访问了校准文件,一个校准文件如下:
I accessed calibration files from part odometry of KITTI, wherein contents of one calibration file are as follows:
P0: 7.188560000000e+02 0.000000000000e+00 6.071928000000e+02 0.000000000000e+00 0.000000000000e+00 7.188560000000e+02 1.852157000000e+02 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 0.000000000000e+00
P1: 7.188560000000e+02 0.000000000000e+00 6.071928000000e+02 -3.861448000000e+02 0.000000000000e+00 7.188560000000e+02 1.852157000000e+02 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 0.000000000000e+00
P2: 7.188560000000e+02 0.000000000000e+00 6.071928000000e+02 4.538225000000e+01 0.000000000000e+00 7.188560000000e+02 1.852157000000e+02 -1.130887000000e-01 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 3.779761000000e-03
P3: 7.188560000000e+02 0.000000000000e+00 6.071928000000e+02 -3.372877000000e+02 0.000000000000e+00 7.188560000000e+02 1.852157000000e+02 2.369057000000e+00 0.000000000000e+00 0.000000000000e+00 1.000000000000e+00 4.915215000000e-03
Tr: 4.276802385584e-04 -9.999672484946e-01 -8.084491683471e-03 -1.198459927713e-02 -7.210626507497e-03 8.081198471645e-03 -9.999413164504e-01 -5.403984729748e-02 9.999738645903e-01 4.859485810390e-04 -7.206933692422e-03 -2.921968648686e-01
我可以得出P0,P1代表单色相机,P2,P3彩色相机。据我了解,相机固有的常见形状是
I can get that P0, P1 represent monochrome camera and P2, P3 color camera. To my understanding, common shape of camera intrinsic is
fx 0 cx
0 fy cy
0 0 1 .
所以我无法弄清楚每个参数中剩下的三个参数(我猜是用于失真校正)的含义行和标签 Tr
之后的最后一行。
So I cannot figure out the meaning of remaining three parameter (I guess used for distortion rectification) in each line and the last line following label Tr
.
类似的问题可以从这篇文章,但是对我来说答案仍然不明显。有人可以帮我吗?
A similar question can be found from this post, but answers to it are still unobvious to me. Can anyone help me out?
推荐答案
在这些文件中, P1
, P0
等不是相机内在函数,而是投影矩阵,由类似以下内容定义
In those files, P1
, P0
etc are not camera intrinsics but projection matrices, defined by something like
P1=calibration_matrix * [R_1 | T_1]
这意味着它们的大小为 3 * 4
。我不确定相应的定义是否是上面的定义,或者您是否必须使用(嗯,这是一个等效的定义,或多或少...)
which means that they are of size 3*4
. I'm not exactly sure whether the corresponding definition is the one above or if you'll have to use (well, it's an equivalent definition, more or less...)
P1=calibration_matrix*[R_1.transpose() | -R_1.transpose()*T_1]
,但我认为通过阅读即可轻松检查/显示数据。
but I think that it's easy to check this by just reading/displaying the data.
对于 Tr
,它是所有摄像机位置的串联。您有四个摄像机 P0,...,P3
,而 Tr
的摄像机 12
元素,因此前三个是 P0
的翻译,接下来的三个是 P1
等等。我不确定的是每个参数都表示为 T_i
还是 -R_i.transpose()* T_i
。我认为最安全的方法是尝试通过处理数据进行检查。
As for Tr
, it is the concatenation of all camera positions. You have four cameras P0, ..., P3
, and Tr
has 12
elements, so the first three are the translation of P0
, the next three are the translation of P1
and so on. What I'm not sure about is whether each of those are expressed as T_i
or -R_i.transpose()*T_i
. I think the safest way is try to check this by playing with the data.
至于为什么有四个摄像机 P0,..., P3
,引用其论文:
As for why there are four cameras P0, ...,P3
, to quote their paper:
此处
i
∈
{
0
,
1
,
2
,
3
}
是相机索引,其中
0
代表$ b左边的灰度是$ b,右边的灰度是
1
,左边是
2
,右边是彩色相机
3
。
我认为这也解释了为什么它们的投影矩阵彼此接近。
I think that also explains why their projection matrices are close to each other.
这篇关于KITTI校准文件中的参数格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!