Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
DBSCAN Class Reference

DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm implementation. More...

#include <dbscan.hpp>

Inheritance diagram for DBSCAN:
Inheritance graph
Collaboration diagram for DBSCAN:
Collaboration graph

Public Member Functions

 DBSCAN (int min_cluster_size, double neighbours_dist_threshold)
 Constructor for the DBSCAN clustering algorithm.
 
void clustering (const sensor_msgs::msg::PointCloud2::SharedPtr &point_cloud, std::vector< Cluster > *clusters) const override
 Clusters the input point cloud into groups using the DBSCAN algorithm.
 

Private Attributes

int min_cluster_size
 Minimum number of points required to form a cluster.
 
double neighbours_dist_threshold
 Maximum distance between points to be considered as neighbors.
 

Detailed Description

DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm implementation.

The DBSCAN class is a concrete implementation of the Clustering interface, using the DBSCAN algorithm to cluster point clouds based on density and distance thresholds.

Definition at line 14 of file dbscan.hpp.

Constructor & Destructor Documentation

◆ DBSCAN()

DBSCAN::DBSCAN ( int  min_cluster_size,
double  neighbours_dist_threshold 
)

Constructor for the DBSCAN clustering algorithm.

Parameters
min_cluster_sizeMinimum number of points required to form a cluster.
neighbours_dist_thresholdMaximum distance between points to be considered as neighbors.

Definition at line 3 of file dbscan.cpp.

Member Function Documentation

◆ clustering()

void DBSCAN::clustering ( const sensor_msgs::msg::PointCloud2::SharedPtr &  point_cloud,
std::vector< Cluster > *  clusters 
) const
overridevirtual

Clusters the input point cloud into groups using the DBSCAN algorithm.

This function implements the clustering method from the Clustering interface.

Parameters
point_cloudA shared pointer to a point cloud of type pcl::PointCloud<pcl::PointXYZI>.
clustersA pointer to a vector of shared pointers to point clouds to store the resulting clusters.

Implements Clustering.

Definition at line 6 of file dbscan.cpp.

Member Data Documentation

◆ min_cluster_size

int DBSCAN::min_cluster_size
private

Minimum number of points required to form a cluster.

Definition at line 37 of file dbscan.hpp.

◆ neighbours_dist_threshold

double DBSCAN::neighbours_dist_threshold
private

Maximum distance between points to be considered as neighbors.

Definition at line 38 of file dbscan.hpp.


The documentation for this class was generated from the following files: