K-means segmentation

Version 1.0.0.0 (11.9 KB) by Alireza
This code implements K-means color segmentation
3.8K Downloads
Updated 27 Aug 2015

View License

Demo.m shows a K-means segmentation demo

K-means clustering is one of the popular algorithms in clustering and segmentation. K-means segmentation treats each imgae pixel (with rgb values) as a feature point having a location in space. The basic K-means algorithm then arbitrarily locates, that number of cluster centers in multidimensional measurement space. Each point is then assigned to the cluster whose arbitrary mean vector is closest. The procedure continues until there is no significant change in the location of class mean vectors between successive iterations of the algorithms.

Cite As

Alireza (2024). K-means segmentation (https://www.mathworks.com/matlabcentral/fileexchange/52697-k-means-segmentation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: K-means clustering

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0