Template Function ouster::destagger

Function Documentation

template<typename T>
inline img_t<T> ouster::destagger(const Eigen::Ref<const img_t<T>> &img, const std::vector<int> &pixel_shift_by_row, bool inverse = false)

Generate a destaggered version of a channel field.

In the default staggered representation, each column corresponds to a single timestamp. In the destaggered representation, each column corresponds to a single azimuth angle, compensating for the azimuth offset of each beam.

Destaggering is used for visualizing lidar data as an image or for algorithms that exploit the structure of the lidar data, such as beam_uniformity in ouster_viz, or computer vision algorithms.

For example: destagger(lidarscan.field(Field::INTENSITY)) destagger(lidarscan.field(Field::INTENSITY).cast<double>())

Parameters:
  • img – the channel field

  • pixel_shift_by_row – offsets, usually queried from the sensor

  • inverse – perform the inverse operation

Returns:

destaggered version of the image