K means clustering for Image Compression

K-means clustering is a popular vector quantization method for data compression.
2.7K Downloads
Updated 22 Apr 2013

View License

k-means clustering is used for Image Compression. In this matlab program, the feature vectors are simply the N X N non-overlapping blocks of pixels in the image. Like a scalar quantizer, a vector quantizer has a quantization levels called codevectors and the set of K such codevectors is called codebook of size K.

K-means clustering is an iterative process in which the codevectors are refined every stage by computing the centroid of the input vectors which belong to the respective cluster.

Cite As

Vinay Kumar Tadepalli (2024). K means clustering for Image Compression (https://www.mathworks.com/matlabcentral/fileexchange/36376-k-means-clustering-for-image-compression), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.5.0.0

A small bug is fixed.

1.4.0.0

I have revamped the code completely to make it more efficient(run Faster). I have rectified all the previous bugs. Feel free to contact me at my email address. See ya!!

1.3.0.0

I have revamped the code completely to make it more efficient and hence run faster. The bugs in the previous version are fixed and hopefully its bug-free now. See ya!! :)

1.2.0.0

This file solves the issues with different dimensions of the images and also prints the output in a user-friendly manner.

1.1.0.0

The file I uploaded previously will fail to work for Images of different dimensions, since it was not generalized for all the dimensions. This updated file contains the instructions for working on different dimensions of Images.

1.0.0.0