基于投影矩阵将点云投影到相机平面上

Projecting a point cloud onto the camera plane based on the projection matrix

我有一个点云,我使用 open3d 从 .dat 转换为 .ply。 .ply文件的内容是一个(nx3)矩阵对应x,y,z点,还有另一个(nx3)矩阵对应RGB信息。点总数远远超过 200 万(激光雷达安装在车辆顶部)。我还有一组立体相机,安装在 LiDAR 旁边(一个左边,一个右边),其中我只有相机的固有参数。

我正在尝试复制在几篇论文中找到的公式,可以看到here, equations 2 & 3. It is originally found in the Kitti dataset paper, equation 8. Basically, they are projecting a point cloud based on the cameras projection with the following equation: where P is the projection matrix--containing the camera intrinsic parameters, R the rectifying rotation matrix of the reference camera, T_{cam}^{velo} the rigid boy transformation from lidar coordinates to camera coordinates, and T_{velo}^{imu}

我要注意并不是所有的论文都使用最后一个参数(T_{velo}^{imu}),因为我没有imu信息所以我会省略那个参数。

虽然我只有相机内部参数,但我可以通过 Essential matrix 提取相机旋转和平移。除了数据,我还有一个文件,其中包含拍摄图像时相机和激光雷达的偏航、俯仰和滚动(以度为单位)。我知道我可以从这些参数中提取旋转矩阵,但我不太确定在这种情况下如何使用它们,特别是获取从激光雷达到相机坐标的刚体变换。我还应该提到,在拍摄每张图像时,我有相机的真实世界坐标(在 x、y、z 坐标中)。

这里是激光雷达和相机坐标系之间转换点的详细答案。我使用了 3D 变换的齐次表示(4x4 矩阵),因为它更容易操作,但如果您改用 R 和 T,它会完全一样。 (等式会更长)