I've been working for some while with the createRangeImage Function from the
PCL lib. The range images look quite nice, but I have some technical
questions regarding the interpolation of the pixels using the Z-Buffer.
So I have a HDE32 dataset, and if I set the correct parameters (angular
resolution etc...) from the velodyne documentation, the images look good but
their height size is just 24 px using the correct 41.33 degree height angle
and 1.33 y-resolution (instead of the expected 31-32px). If I start using a
higher angle (as mentioned in this tutorial, the angle should not really
matter to the algorithm and therefore can be set even to 180 degrees), I'm
getting a range of 31-36 px in the height. So far my assumption is that the
z-Buffer interpolates some pixels while creating the panorama images and
therefore the height varies? Could anybody explain me this behaviour?
Re: PCL Create RangeImages and Intensity from Lidar
Given the absence of replies I'm gonna throw in my two cents.
You're defining a sphere surface in a range given in spherical
coordinates and you want to map it to a rectangle, so basically
(Phi, Theta) -> (u, v).
Now realize the (Phi = 0, Theta = x) will all map to a single point,
despite whatever x you might choose. The same happens if you're on
(Phi = 180º, Theta = whatever).
At this point you have at least these options to go for:
- one point in spherical coordinates will only map to a single pixel
in image coordinates, resulting in images with this
- you let the same point in your spherical surface to map to
multiple pixels in image coordinates in order to have the entire
image with pixels and then you get things something like this.
In any case there's always distortion happening, especially the
further you go in the range limits of Phi. People then optimize for
certain objectives. Have a look at the wikipedia page just regarding
Now I personally never dug into that code in PCL but if this is
relevant for you I don't think there's any way around it. This is
you're gonna be needing to look at most likely.
Furthermore I wanted to create Intensity Images using this method. What
would be the easiest way to achieve this with pcl?
The RangeImage type is derived from
PointCloud<PointWithRange>. The range is accessible through
the field 'range' and I assume RangeImage ensures that the
underlying point cloud is organized so worst case scenario you have
a way to do it manually, but you have everything you might need to
make it work.