Page 1 of 1

Posted: 2006-07-17T17:52:01-07:00
by magick
Until we get a patch in the current ImageMagick release, use
  • image->SigmoidalContrast( "3x50" );

Re: simoidalContrast: unrecognized 'mid-point'

Posted: 2009-12-28T03:09:32-07:00
by tcrass
Hi threre,
Until we get a patch in the current ImageMagick release, use

image->SigmoidalContrast( "3x50" );
it seems that currently neither this method, nor the parameters described in the PerlMagic documentation work as they should. At least for me, the following bit of code

Code: Select all

my $img = Image::Magick->new();
$img->Set(size => '160x120');
$img->Read('gradient:#ffffff-#000000');

push(@$img, $img->[0]->Clone());
$img->[1]->SigmoidalContrast(contrast => 3, 'mid-point' => 10);

push(@$img, $img->[0]->Clone());
$img->[2]->SigmoidalContrast(contrast => 3, 'mid-point' => 90);

push(@$img, $img->[0]->Clone());
$img->[3]->SigmoidalContrast(contrast => 3, 'mid-point' => 0.1);

push(@$img, $img->[0]->Clone());
$img->[4]->SigmoidalContrast(contrast => 3, 'mid-point' => 0.9);

push(@$img, $img->[0]->Clone());
$img->[5]->SigmoidalContrast('3x10');

push(@$img, $img->[0]->Clone());
$img->[6]->SigmoidalContrast('3x90');

$img->Montage()->Write('sigmoidalContrast.png');
creates a bunch of virtually indistinguishable images, demonstrating that the mid-point option has no effect. (Or am I missing something?)

Regards --

tcrass

P.S. Using perlmagick from an up-to-date Debian Sid installation.

Re: simoidalContrast: unrecognized 'mid-point'

Posted: 2009-12-28T07:01:34-07:00
by magick
Use '3x50%' or use an absolute value that scales to the quantum-depth of your ImageMagick distribution. Most likely its Q16 so use 59000 instead of 90.

Re: simoidalContrast: unrecognized 'mid-point'

Posted: 2009-12-28T11:14:48-07:00
by tcrass
magick wrote:Use '3x50%' or use an absolute value that scales to the quantum-depth of your ImageMagick distribution. Most likely its Q16 so use 59000 instead of 90.
That works, thanks a lot! :-)

The original posting is from 2006 -- any chance that either PerlMagick or the documentation gets updated?

Regards --

tcrass