Skip to content

Simple MATLAB function that finds clusters given a set of points. That is, it identifies groups of points that fall in range of a threshold.

Notifications You must be signed in to change notification settings

ferxinii/cluster-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Cluster finder 🔍

In this context, a cluster is defined as a subset of points where the distance between two neighboring points is less than a given threshold (see image). It is thought for 3D space, but might be easily tuned up (if it does not work already) for higher dimensions using euclidean distance. I believe there might be a more efficient implementation.

INPUT:

  • points: Set of N points in 3D space. NX3 array.
  • threshold: Maximum distance between two points to belong to the same cluster.

OUTPUT:

  • clusters: MX1 cell array, with each cluster, each cluster being an array with the index of the points that make it up. M is the total number of clusters.
  • cluster_id: An NX1 array mapping each point to the cluster index it belongs to.

Prototype

[clusters, cluster_id] = cluster_finder(points, threshold);

Visual definition of cluster

Example 1

About

Simple MATLAB function that finds clusters given a set of points. That is, it identifies groups of points that fall in range of a threshold.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages