Skip to content

qveex/k-means_clustering_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k-means clustering of image


Clustering of image by k-means algorithm

The source image is selected when Main.kt is starting

To display the image is used JPanel and BufferedImage in Image.kt

Clustered image is saved in root of project


IClusterizer.kt allows you to add others implementations of clustering

Cluster.kt and Pixel.kt just (nearly) data classes for clustering

KMeansClusterizer.kt - my implementation of k-means. Details of implementation are described in comments in class file.

Results:

Images layout in README by @alexander-lee description

Source Image 5-means Clustering (with 20 iterations)
1a clusteredImage(k = 5)
10-means Clustering (with 20 iterations) 20-means Clustering (with 20 iterations)
clusteredImage(k = 10) clusteredImage(k = 20)

Releases

No releases published

Packages

No packages published

Languages