**[3 P]**Apply the k-means algorithm for lossy image compression by means of vector quantization.

- Download the
image
`mandrill.tif`.^{6}Each pixel represents a point in a three dimensional (r,g,b) color space. Each color dimension encodes the corresponding intensity with an 8 bit integer. - Cluster the pixels in color space using k-means with
clusters
and replace the original color values with the indices of the closest cluster centers. You can
use the MATLAB function
`kmeans`

to do the clustering. Determine the compression factor for each value of and relate it to the quality of the image. Apply an appropriate quality measure of you choice.

Present your results clearly, structured and legible. Document them in such a way that anybody can reproduce them effortless. Send the code of your solution to mailto:florian.hubner@igi.tugraz.atflorian.hubner@igi.tugraz.at

Hubner Florian 2014-01-21