4 ms·
I would do it in RGB space. Run kmeans to get a set of Voronoi cell centroids, 5-6 should be good. Then take the Delaunay triangulation of that and pick a colo
by crb002 13y ago
I would do it in RGB space. Run kmeans to get a set of Voronoi cell centroids, 5-6 should be good. Then take the Delaunay triangulation of that and pick a color midpoint between Voronoi neighbors that maximizes the distance sum from all the Voronoi generator points.
[1] http://en.wikipedia.org/wiki/File:Delaunay_Voronoi.svg http://en.wikipedia.org/wiki/File:Delaunay_Voronoi.svg
[2] http://people.sc.fsu.edu/~jburkardt/isu/reu_2001/voronoi_paper/voronoi.pdf http://people.sc.fsu.edu/~jburkardt/isu/reu_2001/voronoi_pap...