RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Voxel Filtering

Performs voxel grid downsampling on a point cloud with optional index filtering. More...

Functions

pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZ on provided indices.
 
pcl::PointCloud< pcl::PointNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointNormal on provided indices.
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZRGB on provided indices.
 
pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZRGBNormal on provided indices.
 
pcl::PointCloud< pcl::PointXYZI >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZI on provided indices.
 
pcl::PointCloud< pcl::PointXYZINormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZINormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZINormal on provided indices.
 
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZ.
 
pcl::PointCloud< pcl::PointNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointNormal.
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZRGB.
 
pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZRGBNormal.
 
pcl::PointCloud< pcl::PointXYZI >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZI.
 
pcl::PointCloud< pcl::PointXYZINormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::voxelize (const pcl::PointCloud< pcl::PointXYZINormal >::Ptr &cloud, float voxelSize)
 Performs voxel grid downsampling on a point cloud of type pcl::PointXYZINormal.
 

Detailed Description

Performs voxel grid downsampling on a point cloud with optional index filtering.

This function downsamples a point cloud using a voxel grid filter. It optionally accepts a set of point indices to limit the operation to a subset of the cloud. For very large point clouds or very small voxel sizes that would cause integer index overflow in the voxel grid structure, the function automatically partitions the space into smaller regions and applies the voxel filtering recursively.

Parameters
cloudThe input point cloud to be voxelized.
indices(Optional) A shared pointer to a vector of indices indicating which points to consider. If empty, the entire cloud is used.
voxelSizeThe voxel (leaf) size for downsampling. Must be greater than zero.
Returns
A new downsampled point cloud as a shared pointer.
Note
If the computed voxel grid exceeds 32-bit integer capacity, the function splits the bounding volume into smaller regions (using a quadtree or octree-like subdivision depending on the Z-axis span) and processes each region recursively.
If the cloud is not dense and no indices are provided, a warning is issued and an empty cloud is returned.
Exceptions
Assertionfailure if voxelSize <= 0.
See also
pcl::VoxelGrid, util3d::cropBox