5 ms·
I also did something similar to this recently, but in PHP. I did grouping similar colors (although I rendered mine as tiled squares), as well as a few other thi
by gburt 15y ago
I also did something similar to this recently, but in PHP. I did grouping similar colors (although I rendered mine as tiled squares), as well as a few other things like grouping by brightness. Some neat results, for sure. I can put the code up for it if anyone is interested.
Here was the quick k-means implementation I threw together if anyone wants to play with it (my whole library licensed GPL).
https://github.com/gburtini/Learning-Library-for-PHP/blob/master/lib/unsupervised/kmeans.php https://github.com/gburtini/Learning-Library-for-PHP/blob/ma...
It could definitely use some serious cleaning up (and I will probably OO-ize it when I get a chance -- or I'll take pull requests), but it definitely works.