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

Performs Euclidean cluster extraction on a point cloud. More...

Functions

std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZ.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZRGB.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZ inside provided indices.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointNormal inside provided indices.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZRGB inside provided indices.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZRGBNormal inside provided indices.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZI inside provided indices.
 
std::vector< pcl::IndicesPtr > RTABMAP_CORE_EXPORT rtabmap::util3d::extractClusters (const pcl::PointCloud< pcl::PointXYZINormal >::Ptr &cloud, const pcl::IndicesPtr &indices, float clusterTolerance, int minClusterSize, int maxClusterSize=std::numeric_limits< int >::max(), int *biggestClusterIndex=0)
 Extract clusters from point cloud of type pcl::PointXYZ.
 

Detailed Description

Performs Euclidean cluster extraction on a point cloud.

This function uses PCL's Euclidean clustering algorithm to segment the input point cloud into clusters based on spatial proximity. It optionally considers a subset of indices within the cloud, and returns the list of clusters as vectors of point indices.

Additionally, it can return the index of the largest cluster found.

Parameters
cloudThe input point cloud from which clusters will be extracted.
indicesOptional pointer to a list of indices to consider for clustering. If empty, the full cloud is used.
clusterToleranceThe spatial distance threshold for clustering. Points within this distance are considered part of the same cluster.
minClusterSizeThe minimum number of points required for a valid cluster.
maxClusterSizeThe maximum number of points allowed in a cluster.
biggestClusterIndexOptional output pointer. If not null, it will be set to the index of the largest cluster in the output.
Returns
A vector of indices, where each element contains the indices of one extracted cluster.
Note
Internally, this uses a KdTree for spatial searches and pcl::EuclideanClusterExtraction for segmentation.
The order of clusters in the output is not guaranteed to reflect size or position.
If no clusters are found, the output vector will be empty and biggestClusterIndex will be set to -1.