4 ms·
With 24 bit color you can create an array with an element for each of the 16 million colors and just build the histogram. Running k-means on that is going to be
by redcalx 9y ago
With 24 bit color you can create an array with an element for each of the 16 million colors and just build the histogram. Running k-means on that is going to be less efficient than just making the histogram buckets larger, e.g. 2x2x2 = 8 colors per bucket, or whatever. So yeh you should be able to do that in a few milliseconds I would have thought. For more speed look at using SIMD instructions.