a 'perfect' image normalization for line drawings

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
xpt
Posts: 59
Joined: 2010-10-06T20:18:24-07:00
Authentication code: 8675308

a 'perfect' image normalization for line drawings

Post by xpt »

Hi,

I'm looking for a 'perfect' image normalization for line drawings. The "-auto-level" claims it is a 'perfect' image normalization operator, but I found it gave me the least satisfying result on my typical test case.

Please look at the following test case,
http://imagebin.ca/view/0lDKDK2.html

The perfect result would be,

- color levels of image automagically adjusted
- white-balance automagically corrected
- the contrast in an image is automagically increased
- the final size is significantly smaller, since they are only line drawings
- and yes, colors are still in colors

I've tried

convert -auto-level
convert -normalize
convert -normalize -contrast
convert -normalize -contrast -contrast

But still hope that there are better solutions out there.

Please help.

Thanks

xpt
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: a 'perfect' image normalization for line drawings

Post by fmw42 »

see my textcleaner and whiteboard scripts below. They might provide some help or try IM -lat.
xpt
Posts: 59
Joined: 2010-10-06T20:18:24-07:00
Authentication code: 8675308

Re: a 'perfect' image normalization for line drawings

Post by xpt »

Yep, the whiteboard is exactly what I need and works perfectly as expected.

Thanks a lot!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: a 'perfect' image normalization for line drawings

Post by anthony »

-auto-level is a mathematically perfect normalization operator, in image processing terms.
It is generally used for 'generated images', typicaly involved with mathematical image processing, distortion mapping, and grey scale mask handling.

It is not a 'make images look better' operator, as there is no such thing for all users.
Too many factors and adjustments are possible, some which work better for some types of images than others.

Even -normalize is slightly imperfect to allow it to conform to user expectations when applied to JPEG images such as photos. That is it will 'clip' a few percent of the maximum and minimum values to ignore JPEG compression 'noise', It also uses a less than perfect histogram binning method for count pixels to be clipped, and it is in this matter that makes it different to another similar operator -linear-stretch.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply