Skip to content

yzlhbg/Image-compression-using-K-means-Clustering

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image Compression using K-Means algorithm.

The script uses K-Means, a Machine Learning clustering algorithm, to cluster all the colors in an image into 16 clusters and replace the RGB value of every pixel with the RGB value of their respective cluster center and thus reducing the amount of memory required to save a picture.

Requirements

  1. Python
  2. numpy
  3. matplotlib
  4. Scipy

Instructions Download script.py in your required directory

Note Use a .png file as JPEG uses lossy compression which may lead to undesired result.

Author Krishna Heroor

About

Image compression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%