Page 1 of 1

Convert colored document in perfect black&white

Posted: 2014-09-18T03:03:12-07:00
by kadkam
Hi

Hi need to convert a document with red/green background in a black&white.
After, i need to apply a rgb curve modification but it's hard to understand.
Please can you write for me a command line example that, approximated, respect the modification curve?

Before

Image

after

Image

THANKS

Re: Convert colored document in perfect black&white

Posted: 2014-09-18T09:54:10-07:00
by fmw42
Do you have the software that created the curve? If so, then on IM create a PNG hald:8 image. Take that image to your other software. Apply the curve to the hald image and save it as PNG (not JPG). Then bring it back to IM and apply the hald image to your grayscale image (or colored image converted to gray with -colorspace gray) using -hald-clut.

See
http://www.imagemagick.org/Usage/color_mods/#hald-clut