Page 1 of 1

Normalizing colors of a scanned image

Posted: 2015-07-20T13:57:40-07:00
by ebr4him
I have this scanned image in low-res:
Image
Image

I need to sharpen the text, smoothen it, clear the noise around it, and for any colored (red title, border especially) elements, ideally I want to convert them to a single solid color, or reduce colors as much as possible so its looks better.

I tried

Code: Select all

convert 003.jpg -alpha off -auto-level -normalize -level 10%,90% -sharpen 0x1 -fuzz 50% -strip -quality 70 -colors 16 -brightness-contrast -5x20 -resize '720' -selective-blur 0x4+10%  003a.jpg
but it doesn't seem to work:

Image



I'd appreciate any help! Thanks.

Re: Normalizing colors of a scanned image

Posted: 2015-07-20T14:54:01-07:00
by fmw42
Please always provide your version of IM and platform. Syntax is different for Windows and Unix as is scripting.

Re: Normalizing colors of a scanned image

Posted: 2015-07-20T18:23:40-07:00
by ebr4him
Oh ok.

6.9.1-6 Q16 x86_64 on Mac

Re: Normalizing colors of a scanned image

Posted: 2015-07-20T18:46:04-07:00
by fmw42
Oh ok.

6.9.1-6 Q16 x86_64 on Mac

Please read viewtopic.php?f=1&t=9620 which is the very top link in the Users forum


If you want to reduce colors, then see -colors or -remap.

http://www.imagemagick.org/Usage/quantize/#colors
http://www.imagemagick.org/Usage/quantize/#remap

or try my script, kmeans, at the link below.

For noise removal, see -despeckle or -enhance.

http://www.imagemagick.org/script/comma ... #despeckle
http://www.imagemagick.org/script/comma ... hp#enhance

or try some of my noise reduction scripts at the link below.

I do not think -morphology open or close will help without disturbing your text.

To sharpen, see -unsharp.

Re: Normalizing colors of a scanned image

Posted: 2015-07-20T18:52:10-07:00
by ebr4him
Thanks for the links, however noise reduction and sharpening are least of the problem, I can achieve that easily but its the color 'normalization' that I want.

If you see the border, its different on all sides, light on top, dark on left and normal on bottom and right. Not sure how to 'normalize' it. Tried a lot of things including fuzz, dither etc, but can't get the combination right.

Re: Normalizing colors of a scanned image

Posted: 2015-07-20T19:47:07-07:00
by snibgo
The main problem is that the paper has been burnt out ("clipped") to white. This makes automated correction of tones and colours more difficult. Was this whitening done by the scanner, or by later software?

The next problem is that the images have been compressed with JPEG, which heavily degrades image like this that have solid colours.

If you have better quality sources, the job is much easier.