Skip to content

Commit

Permalink
Godd attempt but didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
nachovizzo committed May 8, 2024
1 parent 950c19b commit 86ad547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lidar_visualizer/datasets/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def read_kitti_scan(file):
def read_scan_with_intensities(file):
scan = self.o3d.t.io.read_point_cloud(file)

if hasattr(scan, "point.colors"):
if "colors" in dir(scan.point):
return scan.to_legacy()

if hasattr(scan, "point.intensity"):
if "intensity" in dir(scan.point):
intensity = scan.point.intensity.numpy()
intensity = intensity / intensity.max()
scan.point.colors = self.cmap(intensity)[:, :, :3].reshape(-1, 3)
Expand Down

0 comments on commit 86ad547

Please sign in to comment.