LibCapy - kmeans

Class implementing the k-means algorithm.

Macros:

Enumerations:

Type of initialisation for the k-mean algorithm

Typedefs:

None.

Struct CapyKMeansClusterOfPoint :

Struct CapyKMeansClusterOfPoint's properties:

Id of the cluster of the point

Distance from the point to the cluster center

Struct CapyKMeansClusterOfPoint's methods:

None.

Struct CapyKMeans :

Struct CapyKMeans's properties:

Type of initialiation (default: plusplus)

Clusters center

Struct CapyKMeans's methods:

Destructor

Cluster a point cloud.

Input argument(s):

pointCloud: the point cloud to be clustered
k: the number of clusters

Output and side effect(s):

Update that->clusters.

Exception(s):

May raise CapyExc_MallocFailed.

Get the cluster of a given point

Input argument(s):

v: the point

Output and side effect(s):

Return the cluster id for the given point

Apply the clustering to an image color

Input argument(s):

img: the image

Output and side effect(s):

The image colors are replaced with the color of their cluster)

Functions:

Create a CapyKMeans

Output and side effect(s):

Return a CapyKMeans

Allocate memory for a new CapyKMeans and create it

Output and side effect(s):

Return a CapyKMeans

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyKMeans* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyKMeans to free

2022-08-16
in LibCapy,
34 views
Copyright 2021-2024 Baillehache Pascal