Question

I have many 3D point clouds gathered by velodyne sensor. eg(x, y, z) in meter.

I'd like to convert 3D point clouds to range image.

Firstly, I've got transformtation from Catesian to spherical coordinate.

r = sqrt(x*x + y*y + z*z)
azimuth angle = atan2(x, z)
elevation angle = asin(y/r)

Now. How can I convert 3D point to Range image using these transformation in matlab?

Whole points are about 180,000 and I want 870*64 range image.

azimuth angle range(-180 ~ 180), elevation angle range(-15 ~ 15)

Was it helpful?

Solution

Divide up your azimuth and elevation into M and N ranges respectively. Now you have M*N "bins" (M = 870, N = 64).

Then (per bin) accumulate a histogram of points that project into that bin.

Finally, pick a representative value from each bin for the final range image. You could pick the average value (noisy, fast) or fit some distribution and then use that to pick the value (more precise, slow).

OTHER TIPS

The pointcloud2image code available from Matlab File Exchange can help you to directly convert point cloud (in x,y,z format) to 2D raster image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top