Skip to content

pranjalks/image-comp-kmeans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image-comp-kmeans

Image compression using K-Means algorithm.

K-Means Algorithm

K-Means is an Unsupervised learning algorithm that groups unlabeled dataset into different clusters.

Image Compression

Using the K-Means algorithm imported from sklean python library, image compression can be carried out by grouping similar colors in k-clusters. This k can be varied. Increasing the value of k reduces the size of the image at the cost of image quality. For the shared code, k has been set to 64.

Example Image

For the example image uploaded inside this repository:
Initial size of the Image: 1.31 MB
Size of the Compressed Image: 0.99 MB
Image compressed by 24.43%

About

Image compression using K-Means algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published