I'm running the command like:
Code: Select all
convert input.jpg -colorspace RGB -dither none -remap colors.bmp output.bmp
colors.bmp: http://static2.yaymicro.com/pub/examples/colors.bmp (small image, only 12 pixels)
output.bmp: http://static2.yaymicro.com/pub/examples/output.bmp
I'm actually running the command as:
Code: Select all
convert input.jpg -colorspace RGB -dither none -remap -format %c histogram:info:-
I've tried different methods, but I end up getting what I would consider to be wrong colours for the remaps. The part of the image that is clearly orange, ends up being red. If I calculate the total distance of the RGB colours, it's closer to orange than to red. I'm also clearly not interested in the pink part, where I feel the image is grey or white. Doing dithering removes the pink parts and replaces them with grey and white, but the orange is still red.
How does ImageMagick do it's nearest neighbour calculations?
Any other way to use ImageMagick to do get the amount of predefined colours in an image?
Bjorn
_________________________________________________________________
Version: ImageMagick 6.8.0-7 2012-12-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenCL