Skip to main content

extract_euclidean_clusters

Function extract_euclidean_clusters 

Source
pub fn extract_euclidean_clusters(
    cloud: &PointCloud<Point3f>,
    config: &EuclideanClusterConfig,
) -> Result<ClusterExtractionResult>
Expand description

Euclidean cluster extraction using a region-growing BFS approach.

Builds a KD-tree over the cloud, then grows clusters by expanding into all unvisited points within config.tolerance of any seed point. Clusters outside the [min_cluster_size, max_cluster_size] range are discarded.

§Arguments

  • cloud - Input point cloud
  • config - Cluster extraction parameters

§Returns

  • Result<ClusterExtractionResult> - The extracted clusters (largest first)