minwoo0611 / HeLiPR-File-Player

This is the repository for HeLiPR file player.
https://sites.google.com/view/heliprdataset
40 stars 5 forks source link

how to make range image from OS2-128 #9

Closed CLOMING closed 1 week ago

CLOMING commented 1 month ago

I want to make a intensity image from OS2-128, but the number of points is varying between 100000~120000 when I checked, which is expected to be fixed number of points 131072 (128x1024). Is there any way to get original data and range image code (driver version or pixel offset info of intensity with points index) ?

minwoo0611 commented 1 week ago

Hello @CLOMING,

Firstly, apologies for the delayed response. I've been occupied with writing papers recently, which caused the delay. Regarding your question, the variation in the number of points you observe (ranging between 100,000 and 120,000) is due to the fact that we do not save undetected points to minimize the data size. While the actual point count for OS2-128 should be 131,072 (128x1024), the bin file you have will contain fewer points because of this optimization. Therefore, it's not possible to recover the original data with the exact 131,072 points.

However, you can still generate a range or intensity image using the provided bin file. I suggest following an approach similar to what is implemented in the LIO-SAM codebase, specifically in this part: LIO-SAM code link.

Since the ring index is available, you can determine all the indices for each column. For the vertical (horizontal) index, you can compute the azimuth from the x, y, z coordinates of each point. Using this azimuth, you can estimate the row index for the image. There might be some blank pixels in the resulting image, but this would just indicate that the original image lacks information at those points, so you can safely fill these with a 0 intensity value.

I hope this helps you with your task. Let me know if you have any further questions!

Best regards.