Wolfgang,

>
>2) @ Fred: The mean value which is needed for the gamma formula can be
>computed without using the "quantumrange" value, just by
>identify photo.jpg -format "%[fx:mean]"


Sorry, I just looked again at my script. You are misunderstanding how 
I used gamma.

gamma is the ratio of logs of the mean and midvalue of the dynamic range

The quantumrange is used only depending upon your version of IM to 
get the mean value converted from absolute graylevels to the range 0 
to 1 in order to correspond to a midvalue of 0.5

>
>3) @ Fred: I think that "-contrast-stretch" does a better job on this as
>your computing of the "-level" values in your script. As far as I
>understood, "-contrast-stretch" actually lets you specify what
>percentage of the pixels will turn to pure black and pure white. (Correct ?)


Again, I just looked at my script and you are right. In this script I 
used -level and -gamma and cllpped to the actual min an max values in 
the image.

I was thinking of my autowhite script that uses -contrast-stretch and 
allows the user to set the clip percentages, and the neutral gray 
value used in the gamma can be different from 0.5.

You might want to look at that script.




Fred


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to