RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Point Cloud Downsampling

Downsamples a point cloud or LaserScan by keeping only every N-th point. More...

Functions

LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const LaserScan &cloud, int step)
 Downsamples a LaserScan.
 
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointXYZ.
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointXYZRGB.
 
pcl::PointCloud< pcl::PointXYZI >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointXYZI.
 
pcl::PointCloud< pcl::PointNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointNormal.
 
pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointXYZRGBNormal.
 
pcl::PointCloud< pcl::PointXYZINormal >::Ptr RTABMAP_CORE_EXPORT rtabmap::util3d::downsample (const pcl::PointCloud< pcl::PointXYZINormal >::Ptr &cloud, int step)
 Downsamples a point cloud of type pcl::PointXYZINormal.
 

Detailed Description

Downsamples a point cloud or LaserScan by keeping only every N-th point.

This function downsamples a point cloud based on a specified step size. The method adapts based on whether the cloud is organized (2D) or unorganized (1D), and whether it's structured like a depth image or LiDAR scan.

Parameters
cloudThe input point cloud to downsample.
stepThe decimation step. Must be greater than 0.
Returns
A new point cloud containing only the sampled points.
Note
If step <= 1 or the cloud has fewer points than step, the function returns a copy of the input cloud.
Exceptions
Assertionfailure if step <= 0 or, in the case of depth-image-style clouds, if the width and height are not divisible by step.