utiasSTARS / pykitti

Python tools for working with KITTI data.
MIT License
1.15k stars 239 forks source link

A Question About Velodyne Data #4

Closed PatricLee closed 7 years ago

PatricLee commented 7 years ago

Hi, can you help me with a question? I've been working with velodyne for a while, and kitti is a good dataset since it has 3D track lets so I don't have to label stuff myself, but I'm running into a problem. Previously in my project, I use raw points from velodyne, so points with distance and reflectivity, and comes in firing order. It seems that velodyne data in kitti dataset is not stored in firing order, nor is it possible to convert (x, y, z) coordinate back to raw data directly. Actually the number of points in each file is not even multiple of 64. So can you come up with any idea how I should convert velodyne data in kitti so that I could put them in firing order? Or at least I could put 64 points with same rotation together. Many thanks.

sharkybe commented 7 years ago

You can convert the x,y,z to spherical coordinates of azimuth,elevation,radius. Then you can classify the points into 64 rays according to the elevation of each point. But, I dont think its possible to separate them into the azimuth bins, it will be much noisier and not separable, but maybe I'm wrong...

The reason that the number of points is not a multiple of 64 is that KITTI saves only points that returned some data. if you fire a point to the sky it will never return thus will not be recorded.