Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 875 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 875 Bytes

Image Lossy Compression based on K-Means color clustering

Image compression framework based on color-clustering.

Usage

See demo/test.py:

import kmeans.kmeans_compression as kmeans

kmeans.compress(<path to the image>, <number of colors of the compressed output>)

Results:

Original image:

Compressed image:

Note: The approximate file size is measured without taking into account the overhead of the (colors,size) annotation.