See also ImageMagick v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast
Touch/mouse over to see original View modified in new window.
Image
Contrast
Midpoint
Contrast
See also ImageMagick v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast
Parameters
sharpenboolIf true increase the contrast, if false decrease the contrast.
alphafloatThe amount of contrast to apply. 1 is very little, 5 is a significant amount, 20 is extreme.
betafloatWhere the midpoint of the gradient will be. This value should be in the range 0 to 1 - mutliplied by the quantum value for ImageMagick.
channelintWhich color channels the contrast will be applied to.
function sigmoidalContrastImage($imagePath, $sharpening, $midpoint, $sigmoidalContrast)
{
    $imagick = new \Imagick(realpath($imagePath));
    //Need some stereo image to work with.
    $imagick->sigmoidalcontrastimage(
        $sharpening, //sharpen
        $midpoint,
        $sigmoidalContrast * \Imagick::getQuantum()
    );
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}