snark
|
Classes | |
struct | array_hash |
struct | constant_speed |
point motion model with constant speed More... | |
class | gaussian_process |
gaussian process More... | |
class | kalman_filter |
generic kalman filter More... | |
class | pcap_reader |
class | pin_screen |
class | proprietary_reader |
class | range_bearing_elevation |
polar point definition (range-bearing-elevation) More... | |
class | rotation_matrix |
rotation matrix (a quick and dirty class, to refactor at some point) More... | |
class | stdin_reader |
stdin reader More... | |
class | thin_reader |
reader for thinned velodyne data More... | |
class | timer |
simple timer More... | |
class | udp_reader |
udp reader More... | |
struct | velodyne_point |
processed velodyne point More... | |
class | velodyne_stream |
convert stream of raw velodyne data into velodyne points More... | |
class | velodyne_stream< comma::csv::input_stream< velodyne_point > > |
specialisation for csv input stream: in this case nothing to convert More... | |
class | voxel_grid |
class | voxel_map |
Functions | |
template<typename It , typename N , typename Tr > | |
std::map< comma::uint32, std::list< It > > | equivalence_classes (const It &begin, const It &end, comma::uint32 minId) |
partition elements of container | |
template<typename T , std::size_t N> | |
void | fft (boost::array< T, N > &data) |
template<typename T > | |
void | fft (T *data, std::size_t size) |
Cooley-Tukey in-place fft based on Danielson-Lanczos algorithm. | |
template<typename T , std::size_t N> | |
boost::array< T, N > | fft (const boost::array< T, N > &data) |
Cooley-Tukey fft based on Danielson-Lanczos algorithm (convenience function) | |
template<typename It , typename Id , typename F > | |
Id | voted_tracking (It begin, It end, F GetPreviousId, Id vacantId) |
void fft | ( | boost::array< T, N > & | data | ) |
Cooley-Tukey in-place fft based on Danielson-Lanczos algorithm
see: Cooley-Tukey algorithm from Numerical Recipes in C++
see also: Vlodymyr Myrnyy, Simple and Efficient Fast Fourier Transform, Dr. Dobbs' Journal http://www.drdobbs.com/cpp/a-simple-and-efficient-fft-implementatio/199500857
Referenced by fft().
|
inline |
A common problem:
We have two subsequent velodyne scans partitioned. Now we want to colour them. But the partitioning algorithms often don't guarantee that the partition ids will be the same: A tree might have partition id = 5 in partition #1, and 6 in partition #2, although it is the same tree. Therefore, in GUI, the tree will first be, say, blue and then suddenly turn pink.
The following algorithm solves this problem for static and slow-moving objects by simple voting.
It works in one pass (i.e. ~O(N)) by the price of additional memory (as we need to store the previous id - e.g. previous colour).
See unit test for usage example