4 ms·
There is a really cool use of clustering with these scatterplots to do color quantization (i.e. reducing the number of colors). If you want 16 colors, just fin
by psyklic 9y ago
There is a really cool use of clustering with these scatterplots to do color quantization (i.e. reducing the number of colors).
If you want 16 colors, just find 16 clusters and their centroids (e.g. let k=16 for k-means clustering). Replace each pixel with the closest centroid. Then, your image is quantized (and can perhaps be stored more efficiently)!
- ska 9y agoThere is nothing specific about color here - the same approach can be used for intensity re-quantization for example. Effectively you are non-uniformly resampling based on distribution, so relative values/distances go out the window but you keep "detail" in the lower fidelity signal.