Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges. Available since 6.2.9
Touch/mouse over to see original View modified in new window.
Radius
Sigma
Image
Channel
Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges. Available since 6.2.9
Parameters
radiusfloatThe radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.
sigmafloatThe standard deviation of the Gaussian, in pixels.
channelintImagick channel constant;
function adaptiveSharpenImage($imagePath, $radius, $sigma, $channel)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->adaptiveSharpenImage($radius, $sigma, $channel);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}