From: nicolas Date: Mon, 10 Sep 2012 20:34:21 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4973 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fa5719e4be55d0dcf7011569651168b66052c90;p=imagemagick --- diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index ba107e999..011070ea7 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -3347,9 +3347,10 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, and http://www.cs.dartmouth.edu/farid/downloads/tutorials/fip.pdf. The limit of ScaledSigmoidal as a->0 is the identity, but a=0 gives a division by zero. This is fixed above by exiting immediately when - contrast is small. This would appear to be safe because the series - expansion of the logistic sigmoidal function around x=b is - 1/2-a*(b-x)/4+... so that s(1)-s(0) is about a/4. (With tanh, it's a/2.) + contrast is small, leaving the image (or colormap) unmodified. This + appears to be safe because the series expansion of the logistic + sigmoidal function around x=b is 1/2-a*(b-x)/4+... so that the key + denominator s(1)-s(0) is about a/4 (a/2 with tanh). */ #define ScaledSigmoidal(a,b,x) ( \ (Sigmoidal((a),(b),(x))-Sigmoidal((a),(b),0.0)) / \