3 ms·
That's 500x500, I'm sure you can get good results at 32x32 or 64x64 but then part of your color choice is also getting done by the downsampling algorithm. I won
by vasco 8mo ago
That's 500x500, I'm sure you can get good results at 32x32 or 64x64 but then part of your color choice is also getting done by the downsampling algorithm. I wonder if you could get away with just using a downsampling algorithm into a 1x1 and just use that as the main color.
- PaulHoule 8mo agoThat last one is talked about in the article -- it sucks! I think if you were going to "downsample" for the purpose of creating a color set you could just scan through the picture and randomly select 10% (or whatever) of the pixels and apply k-means to that and not do any averaging which costs resources and makes your colors muddy.
- dgroshev 8mo agoRandom sampling makes a lot of intuitive sense, but unfortunately doesn't work well. I just answered over at lobsters: https://lobste.rs/s/t43mh5/okmain_you_have_image_you_want_colour#c_he3k1t https://lobste.rs/s/t43mh5/okmain_you_have_image_you_want_co... I should probably add this nuance to the post itself. Edit: added a footnote
- SigmundurM 8mo agoHow about sampling more from the more "prominent" areas of the image[0] and less from less "prominent" areas? [0]: https://dgroshev.com/blog/okmain/img/distance_mask.png?hash=a921b80a https://dgroshev.com/blog/okmain/img/distance_mask.png?hash=...