Using K-means clustering it is possible to reduce the amount of colors in an image. What are the purposes of using this method for extracting colors from an image?
There are some use cases:
- Palette Generation
The centroids becomes a color in the palette.
If you add the location of the pixels as a feature you can use the K-Means as segmentation tool as done in Super Pixels (See Rectangle Segments of Image (Rectangle Super Pixels) per Pixel and Locate Non Homogenous Areas in an Image).