Using K-Means clustering I reduced the size of an image. Where the input image may has more than 16M possible colors, the output image only consists of 16 colors.
Here I used some interactive plot so that the user manually choose the no of 'k' in the algorithm using a slidebar. When the mouse will be released, it automatically train the model and plot 2 image side by side. The plot_utils
consists of helper function that I used to ploting. Some important concepts and intuition is added in the notebook, (little theory). Although it is not a good way to compress image. I just showed how to do that using ML.
The source code in python is added. I also include some image on which I performed the algorithm(only 4).
prabormukherjee/Img_compression_K-Means
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Compressing an high resolution image into low resolution using K-means
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published