> With regard to my suggestion for using -contrast-stretch, I would
> note that it also uses a histogram to stretch the image.
>
> The other way to do this is to feed the min and max image values to
> -level. Anthony Thyssen has recently greatly improved this function.
> So in unix with a shell, you could do (in IM 6.3.9-1 or higher)
>
> min=`identify -format "%[min]"`
> max=`identify -format "%[max]"`
> convert <inputimage> -level ${min},${max}  <outputimage>
>
> That would be the most exact method for stretching the image so that
> it just exactly spans the range from 0 to QuantumRange, i.e. from
> full black to full white.
>
>
> See notes about -level (and +level) at
> http://www.imagemagick.org/Usage/color/#contrast

Thanks for the help guys.  Anthony points to Fred's work and Fred
points to Anthony's work.  I'm a little confused on the best way to do
this.  Is it the above?  I'm using imagemagick-6.3.8.3-r1 with
perlmagick.

- Grant


>>To the best of my knowledge, -normalize is what it is. The issue is
>>that it forces 2% of the dark data and 1% of the light data to be
>>fully black and fully white.  Thus it will be image dependent whether
>>it helps or hurts your image.
>>
>>If you want to stretch an image so that its min and max values become
>>black and white without burning-out this extra 2% at the low end and
>>1% at the high end, you can use
>>
>>convert <image> -contrast-stretch 0 <output>
>>
>>Normalize is a subset of -contrast-stretch and is equivalent to
>>-contrast-stretch 2%x99%
>>
>>see  http://www.imagemagick.org/script/command-line-options.php#normalize
>>
>>
>>
>>
>>
>>>I just started using the normalize function to normalize my images.
>>>It's usually very impressive and a big improvement over non-normalized
>>>images.  Some of the images are worse though, especially images that
>>>are predominantly one color, especially red.  Is the normalize
>>>function being improved, or is it a static sort of a function that
>>>either works well on an image or doesn't?
>>>
>>>- Grant
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to