Back to Aurora Vision Library website

You are here: Start » Function Reference » Data Classification » Clustering » ClusterPoints2D

ClusterPoints2D


Header: AVL.h
Namespace: avl
Module: FoundationPro

Clusters 2D points using K Means Clustering method.

Syntax

C++
C#
 
void avl::ClusterPoints2D
(
	const atl::Array<avl::Point2D>& inPoints,
	const int inClusters,
	const int inMaxIterations,
	atl::Optional<int> inSeed,
	const int inRunCount,
	atl::Array<atl::Conditional<atl::Array<avl::Point2D>>>& outClusters,
	atl::Array<atl::Conditional<avl::Point2D>>& outCentroids,
	float& outDistanceSum
)

Parameters

Name Type Range Default Description
Input value inPoints const Array<Point2D>& Array of points to cluster
Input value inClusters const int 2 - + 2 Number of clusters to extract
Input value inMaxIterations const int 10 - 1000 200 Maximal number of KMeans iterations
Input value inSeed Optional<int> 0 - + 5489 Seed used to initialize random number generators
Input value inRunCount const int 1 - + 1 Defines how many times the algorithm will be executed
Output value outClusters Array<Conditional<Array<Point2D>>>& Resulting Point2D clusters
Output value outCentroids Array<Conditional<Point2D>>& Center of found clusters
Output value outDistanceSum float& Sum of distance squares from points in array to its respective cluster center