9 ms·
Yes, k-means clustering is well known for its use in color quantization (for instance, reducing the color depth of a 24-bit image to a 8 bit paletted representa
by Sharlin 15y ago
Yes, k-means clustering is well known for its use in color quantization (for instance, reducing the color depth of a 24-bit image to a 8 bit paletted representation that most faithfully captures the original.) Another popular algorithm is median cut which uses an k-d tree to recursively subdivide the color space based on the median color values of the pixels in the source image. Just about any image manipulation program that can output paletted images probably uses one of these algorithms.