Image Compression Using K-Means Algorithm

It compresses the image by representing it into fewer number of colors,
which can be given by us as an input. For e.g.,
im = io.imread("Capture.PNG")
im_com = kmeans(im,16)
im_com will contain the original image represented with only 16 most
appropriate colors.