2

input b/w, output with CLUT

I want to create false color images from grayscale input images. Similar to the typical false color images produced by nasa from b/w inputs to highlight contrast and texture. I can do this in gimp by applying a custom gradient to an indexed color b/w photo. I am sure there is a way to duplicate this with IM but, i cannot find an example in the docs or on stackoverflow. My goal is to automate the process and produce several pseudocolor outputs from each b/w input image. This is for an art project, so no great precision or scientific validity is required. Although, someone may build on my project.

An example would be producing a color relief map from a typical bump map.

Your solution worked. Thank you @MarkSetchell

create new colour look up table named rainbowCLUT.png:

convert -size 1x1! xc:black xc:red xc:orange xc:yellow xc:green xc:blue xc:violet xc:white +append -resize 255x1! rainbowCLUT.png 

apply clut to image:

convert FullMoon2010.jpg rainbowCLUT.png -clut result.png;eog result.png
Jona Engel
  • 369
  • 1
  • 13
Molly
  • 59
  • 8
  • Have a look here... https://stackoverflow.com/a/37387232/2836621 – Mark Setchell Nov 06 '19 at 20:42
  • 1
    And here... https://stackoverflow.com/a/36825769/2836621 – Mark Setchell Nov 06 '19 at 20:43
  • Your solution worked. Thank you @MarkSetchell #create new colour look up table named rainbowCLUT.png convert -size 1x1! xc:black xc:red xc:orange xc:yellow xc:green xc:blue xc:violet xc:white +append -resize 255x1! rainbowCLUT.png #apply clut to image convert FullMoon2010.jpg rainbowCLUT.png -clut result.png;eog result.png – Molly Nov 07 '19 at 01:21
  • Excellent! Not sure what shade you wanted for your green, but you might find you like **ImageMagick** `lime` rather than `green`. – Mark Setchell Nov 07 '19 at 07:09
  • Great Job Mark! @Molly, please post your solution as an answer, and mark it as accepted. It'll help future readers know this question was resolved with Mark's solution. – emcconville Nov 07 '19 at 13:45

1 Answers1

3

Your solution worked. Thank you @MarkSetchell

create new colour look up table named rainbowCLUT.png:

convert -size 1x1! xc:black xc:red xc:orange xc:yellow xc:green xc:blue xc:violet xc:white +append -resize 255x1! rainbowCLUT.png

apply clut to image:

convert FullMoon2010.jpg rainbowCLUT.png -clut result.png;eog result.png
Jona Engel
  • 369
  • 1
  • 13
Molly
  • 59
  • 8