Eliminating blue

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
aporthog
Posts: 37
Joined: 2012-05-30T08:24:46-07:00
Authentication code: 13

Eliminating blue

Post by aporthog » 2013-04-18T13:04:56-07:00

I'm experimenting with seeing if I can remove blue ink underlining from black text on white pages. I've been reading up on all of the color processing options available in IM but I'm afraid it's mostly above my head. The pages will ultimately end up as bitonal so preserving the colors on the page isn't important insofar as I can convert them successfully to bitonal at the end.

So some questions about strategies:

1. Is there away to lighten just the blue colors?
2. Can I enhance contrast or darken non-blue colors?
3. Can I deemphasize the blue colors when converting to grayscale?

My ultimate goal is to leave the blue colors largely behind when I apply a final -threshold.

Here's a sample: http://ucblibrary4.berkeley.edu/~apollo ... lueink.png

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Eliminating blue

Post by Bonzo » 2013-04-18T13:19:01-07:00

I just used blue as the colour to change and you may have a better result if you use a rgb value instead:

Code: Select all

convert blueink.png -fuzz 50% -fill white -opaque blue noblue.jpg

aporthog
Posts: 37
Joined: 2012-05-30T08:24:46-07:00
Authentication code: 13

Re: Eliminating blue

Post by aporthog » 2013-04-18T14:08:37-07:00

Thanks, that seems to do the trick. I had tried just that exact thing some time ago but it had damaged the text too much and I gave it up. But combining it with some other new processing techniques I've learned I'm able to restore the damaged text and this time it seems to work.

Post Reply