public class MeanShiftClustering extends java.lang.Object implements Clustering
Modifier and Type | Field and Description |
---|---|
Cluster<Jcg.geometry.Point_d> |
clusters |
(package private) PointCloud |
N |
(package private) FastRangeSearch<Jcg.geometry.Point_d> |
Rs |
(package private) PointCloud |
seeds |
(package private) double |
sqAvgRad |
(package private) double |
sqCvgRad |
(package private) double |
sqInflRad |
(package private) double |
sqMergeRad |
Constructor and Description |
---|
MeanShiftClustering(PointCloud n,
double bandWidth) |
MeanShiftClustering(PointCloud n,
PointCloud s,
double cr,
double ar,
double ir,
double mr) |
Modifier and Type | Method and Description |
---|---|
Jcg.geometry.Point_d[] |
computeClusters()
Main algorithm for detecting all clusters
Clusters are detected iteratively (until all points are processed)
Clusters are merged if required: when the corresponding peaks are close
|
PointCloud |
detectCluster(Jcg.geometry.Point_d seed,
int clusterIndex)
Single cluster detection -- returns approximate peak and cluster points
The output is a list of point containing:
- all the points belonging to the detected cluster
- the peak point (at the top of the list)
|
Cluster<Jcg.geometry.Point_d> |
getClusters()
Return the description of clusters
|
(package private) void |
initMSC(PointCloud n,
PointCloud s,
double cr,
double ar,
double ir,
double mr) |
int |
mergeCluster(PointCloud cluster,
Jcg.geometry.Point_d[] clusterCenters)
Perform cluster merging
Remark: cluster center is at top of cluster cloud
|
public Cluster<Jcg.geometry.Point_d> clusters
PointCloud N
PointCloud seeds
double sqCvgRad
double sqAvgRad
double sqInflRad
double sqMergeRad
FastRangeSearch<Jcg.geometry.Point_d> Rs
MeanShiftClustering(PointCloud n, PointCloud s, double cr, double ar, double ir, double mr)
MeanShiftClustering(PointCloud n, double bandWidth)
void initMSC(PointCloud n, PointCloud s, double cr, double ar, double ir, double mr)
public Cluster<Jcg.geometry.Point_d> getClusters()
Clustering
getClusters
in interface Clustering
public PointCloud detectCluster(Jcg.geometry.Point_d seed, int clusterIndex)
public int mergeCluster(PointCloud cluster, Jcg.geometry.Point_d[] clusterCenters)
cluster
- the point cloud to be merge (cluster), containing at the top its centerclusterCenters[]
- the set (array) of cluster centerspublic Jcg.geometry.Point_d[] computeClusters()
computeClusters
in interface Clustering