kitti数据集在3D目标检测中的入门(二)可视化详解

推荐阅读第一篇博客:https://blog.csdn.net/qq_37534947/article/details/106628308
因为在写第一篇的时候对于kitti数据集的用法总结的不是太清楚,这里根据可视化代码,然后重新总结一下其主要的流程认知:

一:点云数据bin投影到图像上

一个bin文件对应一个360°方向的点云:
在这里插入图片描述
可以看到其中间黑的位置是车所在的位置,以中心点的3D坐标下,一个bin文件存储着多个点的坐标,(x,y,z,r),r表示反射的强度这里一般用不到。

pointcloud = np.fromfile(str("G:/3Ddet/Point-GNN/000000.bin"), dtype=np.float32, count=-1).reshape([-1, 4])

print(pointcloud.shape)
x = pointcloud[:, 0]  # x position of point
y = pointcloud[:, 1]  # y position of point
z = pointcloud[:, 2]  # z position of point
r = pointcloud[:, 3]  # reflectance value of point
d = np.sqrt(x ** 2 + y ** 
posted @ 2020-06-22 19:47  小小新一枚  阅读(58)  评论(0)    收藏  举报  来源