I have many images (tens of thousands) of fairly large JPG images. Each is an image of an index card. Most of them are white, but some have standard index-card colors (these colors).
The colors correspond to data attributes, so I would like to programmatically classify these cards by color. I know it’s possible to extract the dominant color from images in a web browser using a canvas
element and a an algorithm like color thief, and it works–it gives me an rgb value which is enough to bin the cards.
But I can’t see how I could run such a thing through a web browser on so many images.
I’m wondering if anyone can recommend a command-line tool, perhaps a Python or Ruby module, that could do something similar.