News for hackers. Stuff that matters.
Re:Show HN: Get colour palettes from pictures by skeoh on Thursday April 27, 2017 @09:38AM (#14211345)
Does this use K-means clustering? It seems to be pretty quick!

https://en.wikipedia.org/wiki/K-means_clustering

Re:Show HN: Get colour palettes from pictures by leecarraher on Thursday April 27, 2017 @12:05PM (#14212546)
It is technically k-means, seeing as there are always k=6 or a user specified number of colors reported regardless of the input picture. What k-means algorithm they are using though is uncertain. Could be some form of quantization, or a lloyd type k-means. Could also be hierarchical agglomerative or many-many others. What would be interesting to try out would be some non-parametric clustering algorithms like the image recognition staples mean-shift and dbscan.
Re:Show HN: Get colour palettes from pictures by ravenstine on Thursday April 27, 2017 @11:39AM (#14212301)
Oh wow, I've never heard of that. (EDIT: I knew what color quantization was but not the algoritm) I, too, want to know the implementation details, as I haven't been that impressed with open source libraries to detect distinct colors. Not that they don't do a decent job, but they seem to fall short of the distinct colors the human eye and brain pick up vs what might be mathematically correct.