Point Cloud Library (PCL) 1.12.0
|
K-means clustering. More...
#include <pcl/ml/kmeans.h>
Public Types | |
using | PointId = unsigned int |
using | ClusterId = unsigned int |
using | SetPoints = std::set<PointId> |
using | Point = std::vector<float> |
using | ClustersToPoints = std::vector<SetPoints> |
using | PointsToClusters = std::vector<ClusterId> |
using | Centroids = std::vector<Point> |
Public Member Functions | |
Kmeans (unsigned int num_points, unsigned int num_dimensions) | |
Empty constructor. | |
~Kmeans () | |
This destructor destroys. | |
void | setClusterSize (unsigned int k) |
This method sets the k-means cluster size. | |
void | kMeans () |
void | setInputData (std::vector< Point > &data) |
void | addDataPoint (Point &data_point) |
void | initialClusterPoints () |
void | computeCentroids () |
float | distance (const Point &x, const Point &y) |
Centroids | get_centroids () |
Protected Attributes | |
unsigned int | num_points_ |
unsigned int | num_dimensions_ |
unsigned int | num_clusters_ |
The number of clusters. | |
std::vector< Point > | data_ |
The cluster centroids. | |
ClustersToPoints | clusters_to_points_ |
PointsToClusters | points_to_clusters_ |
Centroids | centroids_ |
using pcl::Kmeans::Centroids = std::vector<Point> |
using pcl::Kmeans::ClustersToPoints = std::vector<SetPoints> |
using pcl::Kmeans::Point = std::vector<float> |
using pcl::Kmeans::PointsToClusters = std::vector<ClusterId> |
using pcl::Kmeans::SetPoints = std::set<PointId> |
Empty constructor.
Definition at line 52 of file kmeans.hpp.
pcl::Kmeans::~Kmeans | ( | ) |
This destructor destroys.
Definition at line 56 of file kmeans.hpp.
Definition at line 116 of file kmeans.h.
References pcl::ConstCloudIterator< PointT >::size().
void pcl::Kmeans::computeCentroids | ( | ) |
void pcl::Kmeans::initialClusterPoints | ( | ) |
void pcl::Kmeans::kMeans | ( | ) |
|
protected |
|
protected |
|
protected |