With the development of technology and digital media, the quality of the data used is also getting higher but the size of the data is also getting bigger and requires larger storage media. To overcome the increasing need for data storage, one way that can be used is by compressing data to save space in storage memory. In this study, the k-means clustering method will be used to compress data in the form of a digital image. By grouping the colors of an image and changing the value of the color pixels in the image based on the value of the cluster center of each cluster member. The initial centroid value which is determined at the initial stage of clustering will affect the compression results. In this study, 10 experiments were carried out, with the best image quality results obtained in the 5th experiment with an MSE value of 70.22 and a PSNR value of 29.70. While the compression quality was obtained in the 7th experiment with a compression ratio of 74.5%. The results of the measurement of image quality in the 10th experiment were also obtained with an MSE value of 73.45 and a PSNR value of 29.51, and the lowest compression quality was obtained in the third experiment with a compression yield ratio of 71.3%. The average measurement results obtained an MSE value of 71.47, a PSNR value of 29.62 and a compression ratio of 72.40%.
Copyrights © 2021