downsample.h

Functions

template<typename DerivedPts, typename DerivedAttrib, typename DerivedOutPts, typename DerivedOutAttrib>
void ouster::core::voxel_downsample(const Eigen::Matrix<typename DerivedPts::Scalar, 3, 1> &voxel_size3, const DerivedPts &pts, const DerivedAttrib &attribs, DerivedOutPts &out_pts, DerivedOutAttrib &out_attribs, int min_pts_per_voxel = 1)

[BETA] Downsample a pointcloud using a voxel grid of the requested resolution.

Remark

this is a beta feature and may change in future releases.

Parameters:
  • voxel_size3 – [in] downsample voxel size

  • pts – [in] Nx3 array of points to downsample

  • attribs – [in] NxM array of attributes for each point to downsample

  • out_pts – [out] Px3 downsampled points array

  • out_attribs – [in] PxM downstampled attributes array

  • min_pts_per_voxel – < [in] minimum number a points a voxel must contain to count

Template Parameters:
  • DerivedPts – type of input Eigen points matrix

  • DerivedAttrib – type of input Eigen attributes matrix

  • DerivedOutPts – type of output Eigen points matrix

  • DerivedOutAttrib – type of output Eigen attributes matrix

template<typename DerivedPts, typename DerivedAttrib, typename DerivedOutPts, typename DerivedOutAttrib>
void ouster::core::voxel_downsample(typename DerivedPts::Scalar voxel_size, const DerivedPts &pts, const DerivedAttrib &attribs, DerivedOutPts &out_pts, DerivedOutAttrib &out_attribs, int min_pts_per_voxel = 1)

[BETA] Downsample a pointcloud using a voxel grid of the requested resolution.

Remark

this is a beta feature and may change in future releases.

Parameters:
  • voxel_size – [in] downsample voxel size

  • pts – [in] Nx3 array of points to downsample

  • attribs – [in] NxM array of attributes for each point to downsample

  • out_pts – [out] Px3 downsampled points array

  • out_attribs – [in] PxM downstampled attributes array

  • min_pts_per_voxel – < [in] minimum number a points a voxel must contain to count

Template Parameters:
  • DerivedPts – type of input Eigen points matrix

  • DerivedAttrib – type of input Eigen attributes matrix

  • DerivedOutPts – type of output Eigen points matrix

  • DerivedOutAttrib – type of output Eigen attributes matrix