Introduction :

There’s a saying that ‘A picture is worth a thousand words’[1]. In today’s era of technology , we are all surrounded by images. From identifying people from images in official records, to uploading pictures on Instagram, Changing profile picture on whatsapp, facebook, using pictures to understand space galaxies, storing memories etc. , images got us covered from all sides.

The Images actually use a big amount of disk space photos from an event can sum upto a couple of GigaBytes. That’s where Image Compression comes in play. Image compression basically means reducing the disk size of the image without much of the effect on its quality. One such Image compression approach is Color Quantization.


Color Quantization :

Color Quantization is a process in which the number of distinct colours in an image is reduced , so as to make the resulting image similar to the original image but with a reduced size [2]. One such approach to reduce the colors of the image is via K-Means Clustering method. The algorithm is explained below

K-Means Clustering

This algorithm comes in play for unsupervised data (unlabelled data), which means that given some set of points , we would like to find the structure in the data. The algorithm that helps to form the clusters of similar data points is known as clustering algorithm. K-Means Clustering is a technique in which the data points are segregated into K different clusters. Each cluster is uniquely identified by the centroid of the cluster. This algorithm groups similar colour values into K clusters and each pixel value (in the final output image)is replaced by the value of the centroid of the cluster to which it belongs.

#image #python #k-means-clustering #compression #machine-learning

Color Quantization for Image Reduction using K-Means Clustering Algorithm
5.00 GEEK