-sigmoidal-contrast documentation

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

-sigmoidal-contrast documentation

Post by snibgo »

The documentation http://www.imagemagick.org/script/comma ... l-contrast is wrong. It says: "Contrast indicates how much to increase the contrast. For example, near 1 is none, 3 is typical and 20 is a lot. Note that exactly zero is mathematically invalid."

It should read, "... For example, near 0 is none, ..."

This is easily shown:

Code: Select all

%IM%convert %SRC% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 0.001x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 0.100x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 0.500x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 0.999x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 1.000x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
%IM%convert %SRC% -sigmoidal-contrast 1.001x50%% -format "%%[fx:mean] %%[fx:standard_deviation] " info:
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -sigmoidal-contrast documentation

Post by magick »

Fixed. Thanks for the patch.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -sigmoidal-contrast documentation

Post by fmw42 »

snibgo wrote:The documentation http://www.imagemagick.org/script/comma ... l-contrast is wrong. It says: "Contrast indicates how much to increase the contrast. For example, near 1 is none, 3 is typical and 20 is a lot. Note that exactly zero is mathematically invalid."
You are correct about the old documentation. It used to not produce good results below 1 going towards zero. But the zero case has already been fixed for quite a while now thanks to Nicolas Robidoux, so zero is valid and produces a no-change result.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -sigmoidal-contrast documentation

Post by snibgo »

Thanks, Fred. I didn't think of testing zero but you are right, it works fine.

I suggest

Code: Select all

For example, near 0 is none, 3 is typical and 20 is a lot. Note that exactly zero is mathematically invalid.
is changed to

Code: Select all

For example, 0 is none, 3 is typical and 20 is a lot.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -sigmoidal-contrast documentation

Post by fmw42 »

I will edit the docs if it is not already changed.
Post Reply