Page 1 of 1

a 'perfect' image normalization for line drawings

Posted: 2010-12-09T22:48:06-07:00
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

Re: a 'perfect' image normalization for line drawings

Posted: 2010-12-10T14:57:03-07:00
by fmw42
see my textcleaner and whiteboard scripts below. They might provide some help or try IM -lat.

Re: a 'perfect' image normalization for line drawings

Posted: 2010-12-11T08:59:18-07:00
by xpt
Yep, the whiteboard is exactly what I need and works perfectly as expected.

Thanks a lot!

Re: a 'perfect' image normalization for line drawings

Posted: 2011-02-09T18:44:23-07:00
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.