Page 1 of 1

Trying to understand -normalize

Posted: 2007-02-11T12:47:50-07:00
by Scott.Prog
Okay, I've been working with IM trying to determine how to simulate the effect that Photoshop has called Auto Levels.

Here the command I'm running and is based on combing through the forums and documentation looking at examples:

Code: Select all

convert sourceFile.jpg -normalize -enhance -equalize -despeckle -quality 95 destinationFile.jpg
The original image looks like this (my daughter):

Image

After running Photoshop and choosing the Auto Levels:

Image

After running the IM command listed above (I also included some code to square it up and put it on a white background)

Code: Select all

-thumbnail '500x500>' -bordercolor white -border 500 -gravity center -crop 500x500+0+0 +repage
Image

I can guess that the softness is from the -despeckle portion of the command but I don't understand why I'm getting such a weird looking image using the -normalize -enhance -equalize portion.

Any ideas? I'm sure I'm using the IM operators incorrectly but can't seem to hit upon the magic combination. Your help is much appreciated. I'm running this build:
Version: ImageMagick 6.3.2 02/08/07 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC

Re: Trying to understand -normalize

Posted: 2007-02-11T19:51:14-07:00
by anthony
Auto-levels isn't just a normalize. and it is equalize that is giving you the weird colors as the histogram is 'leveled'.

Auto-level trys to find the 'bulk' of the colors in the brightness histogram, then linearly stretch out these colors. Im does not have this feature because no one has spent the time to implement it.

There is less than half a dozen of us who even do things in the core regularly.

Re: Trying to understand -normalize

Posted: 2007-02-12T21:41:14-07:00
by Scott.Prog
Ok, so what kind of bribe would be necessary to get something like this added? Amazon wish list? Currency? A nice bottle of single malt Scotch? A mid-priced call girl? :-)

Re: Trying to understand -normalize

Posted: 2007-02-15T08:24:41-07:00
by Scott.Prog
No takers on this? Even for real money?

Re: Trying to understand -normalize

Posted: 2007-02-18T22:03:38-07:00
by anthony
Like I said, few people lots to do.