Code: Select all
magick *.jpg -format "%f,%[fx:int(mean.r*255)],%[fx:int(mean.g*255)],%[fx:int(mean.b*255)]\n" info: > swatchesRGB.csv
But not for these:
How can I add a check for number of (distinct) colours, and then output the RGB values for each of those colours? So for the first three examples it would recognise that, despite lighting and texture, the swatches are pretty much one colour, whilst for the latter two swatches there are two distinct colours?
I am using using ImageMagick 7.0.8-14 on a Windows PC, with BASH syntax.