I would like to analyse a set of hundreds of thousands of product images (clothing, electronic goods etc) and retrieve the dominant colours in each. I'm only interested in the top 3 or 4 colours. The aim is to achieve a degree of certainty that x image is mostly red or image y is mostly orange and blue.
The images are likely to be colour jpegs of reasonable quality and approximately 100kb in size.
I would like to use C# and the solution should run on a Linux server, preferably using open source libraries. What image processing algorithms or techniques might help me achieve this?