York-SDCNLab/IILFM

how to use the intensity of point cloud for rendering image

Closed this issue · 1 comments

In your code, you use the intensity of point cloud to render image:
valid_cloud_i.points[p].x = (points[p][3] != 0) ? points[p][0] * points[p][3] : points[p][0];
valid_cloud_i.points[p].y = (points[p][3] != 0) ? points[p][1] * points[p][3] : points[p][1];
valid_cloud_i.points[p].z = (points[p][3] != 0) ? points[p][2] * points[p][3] : points[p][2];
How did this expression come from?

This is a programing trick. In the beginning, we thought about it if we should program everything from scratch but then we decided to adopt the functions that already exist in the PCL since by doing so it will be easier to maintain this project in the future and easier for others to understand the functions because the PCL official provides many tutorials.

But the issue is that the PCL only provides the functions for generating the range image rather than the intensity image. We tried many methods to generate the intensity image but found that if we still want to use the existing functions (range_image.createFromPointCloud()) in PCL, we have to do a programing trick as shown above.

However, as far as we know, some imaging LiDAR, like the Ouster LiDAR, already provides the real-time intensity image display. Their products definitely have a better solution to this problem as we are still using the PCL functions. Hence, suppose that you have an Ouster LiDAR, then you just need to let our detector subscribe to the image topic.
image