Function ouster::sdk::core::voxel_downsample_3d¶
Defined in File voxel_hash_map.h
Function Documentation¶
-
ArrayX3dR ouster::sdk::core::voxel_downsample_3d(const Eigen::Ref<const ArrayX3dR> &frame, double voxel_size, std::size_t max_points_per_voxel = VoxelHashMap::DEFAULT_MAX_POINTS_PER_VOXEL, std::size_t min_points_per_voxel = VoxelHashMap::DEFAULT_MIN_POINTS_PER_VOXEL, VoxelDownsampleStrategy strategy = VoxelHashMap::DEFAULT_STRATEGY, VHMInternalStorageMode internal_storage_mode = VoxelHashMap::DEFAULT_INTERNAL_STORAGE_MODE)¶
Downsample a positions-only pointcloud.
Takes positions only; use voxel_downsample_xd() for points with attributes, or voxel_downsample() to have the choice made from the attribute layout.
- Parameters:
frame[in] Row-major Nx3 array of point positions.
voxel_size[in] Edge length of each cubic voxel.
max_points_per_voxel[in] Maximum points kept per voxel (FIRST_N_POINT, LAST_N_POINT, RANDOM).
min_points_per_voxel[in] Minimum insertions before a voxel contributes.
strategy[in] The VoxelDownsampleStrategy selecting the per-voxel reduction.
internal_storage_mode[in] How points are stored inside the voxels. AUTO picks fixed point for small voxels, which returns kept positions within a small fraction of the voxel size of the input; ABS returns them exactly.
- Throws:
std::invalid_argument – for a non-positive
voxel_size, a zeromax_points_per_voxel, an unknownstrategy, orstrategySMALLEST or LARGEST (which rank points by an attribute; use voxel_downsample_xd()), even whenframeis empty.- Returns:
The downsampled positions.