"Average color" is not really what I want.
"Average color" is not really what I want.
Separating the subject from the background would also be useful - as simple as weighting the center of the image more than the edges?
The most naive of interpretations (e.g. averaging each of the R/G/B values) is generally not what we want.
Would be super cool to add some different averaging schemes to this.
Polyphora mentioned CIELAB as just one example, and it's a good example. I believe state of the art these days is Oklab[2], talked about here[3]. I'd like to pull out a comment from 'jiggawatts in that discussion:
> This is a tour de force of colour theory, and should be mandatory reading for anyone serious about computer colour!
I completely agree.
With regards to 'p1necone's suggestion, k-nearest neighbors is one simple and relatively easy way to separate the colors into bins. I've only done this on a single image, but with multiple images maybe you could also k-nn bin the resulting colors from each image and only return bins which have multiple members.
0: https://news.ycombinator.com/item?id=25828733
1: https://news.ycombinator.com/item?id=25828773