import numpy as np import matplotlib.pyplot as plt from pointcloud_to_depthmap import pointcloud_to_depth_map pointcloud = np.load("lidar.npy") depth_map = pointcloud_to_depth_map(pointcloud) depth_map = depth_map * 256 depth_map = np.flip(depth_map, axis=1) # so floor is down depth_map = np.swapaxes(depth_map, 0, 1) plt.imshow(depth_map, cmap='gray_r') plt.show()