Page 1 of 1

Converting custom color map to grayscale?

Posted: 2013-10-04T19:47:13-07:00
by blaklite
I'm working on a project that requires converting 16-bit images to 8-bit grayscale. The problem is that the original images are data sets that use color to indicate the amplitude of the data points. I need to convert those colors to grayscale so that 255 (white) is the max and 0 (black) is the min. The color map used in the original data sets is very custom. For example, a low intensity is indicated by red colors from almost white to full red. Higher intensity is indicated by blue, then green, etc.

Is there a good way with ImageMagick to map the custom color map to a standard grayscale map? Any help is appreciated!

Thank you very much!

Re: Converting custom color map to grayscale?

Posted: 2013-10-04T19:57:45-07:00
by fmw42
An example image would help to understand your problem.

But see
http://www.imagemagick.org/Usage/color_mods/#clut

and

viewtopic.php?f=1&t=24193

Re: Converting custom color map to grayscale?

Posted: 2013-10-04T20:04:53-07:00
by fmw42
If on unix you could also try my script mapcolors at the link below, though it may be slow.