HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Median filter image

← meanShiftImage   mergeImageLayers →
Doesn't exist on ImageMagick 7 - write equivalant median_image=StatisticImage(image,MedianStatistic,(size_t) radius,(size_t) radius,exception);

Example

function medianFilterImage($radius, $image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    @$imagick->medianFilterImage($radius);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}