问题描述
我正在查看kitti数据集,尤其是如何将世界点转换为图像坐标。我看了一下README,并在下面说,我需要先转换为相机坐标,然后再乘以投影矩阵。我有2个问题,来自非计算机视觉背景
I am looking at the kitti dataset and particularly how to convert a world point into the image coordinates. I looked at the README and it says below that I need to transform to camera coordinates first then multiply by the projection matrix. I have 2 questions, coming from a non computer vision background
- 我查看了calib.txt中的数字,尤其是矩阵为3x4在最后一列中具有非零值。我一直以为这个矩阵
= K [I | 0]
,其中K是相机的固有矩阵。那么,为什么最后一列非零,这意味着什么呢?例如P2是
- I looked at the numbers from calib.txt and in particular the matrix is 3x4 with non-zero values in the last column. I always thought this matrix
= K[I|0]
, where K is the camera's intrinsic matrix. So, why is the last column non-zero and what does it mean? e.g P2 is
array([[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]])
- 将投影应用于[u,v,w]并将u,v除以w之后,这些值是相对于图像中心处的原点而言的还是原点在图片的左上方?
自述文件:
README:
x = Pi * Tr * X
推荐答案
对于所有P矩阵(3x4),它们表示:
For all the P matrices (3x4), they represent:
P(i)rect = [[fu 0 cx -fu*bx],
[0 fv cy -fv*by],
[0 0 1 0]]
最后一列是基线,以米为单位参考相机0。您可以在最后一列中看到P0都为零,因为它是参考相机。
Last column are baselines in meters w.r.t. the reference camera 0. You can see the P0 has all zeros in the last column because it is the reference camera.
这篇文章有更多详细信息:
This post has more details:How Kitti calibration matrix was calculated?
这篇关于kitti数据集相机投影矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!