import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
# 点云读取
pointcloud = np.fromfile(str("000009.bin"), dtype=np.float32, count=-1).reshape([-1, 4])
# 设置鸟瞰图范围
side_range = (-40, 40) # 左右距离
fwd_range = (0, 70.4) # 后前距离
x_points = pointcloud[:, 0]
y_points = pointcloud[:, 1]
z_points = pointcloud
kitti LIDAR点云生成鸟瞰图BEV
本文介绍了一种将点云数据转换为鸟瞰图像的方法。通过使用Python的numpy和PIL库,从.bin文件中读取点云数据,并将其限制在一个特定区域内。随后,通过缩放和平移操作将点云数据映射到二维图像上,并使用灰度图进行显示。

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



