Skip to content
Related Articles

Related Articles

Improve Article

PHP | Imagick medianFilterImage() Function

  • Last Updated : 27 Aug, 2019

The Imagick::medianFilterImage() function is an inbuilt function in PHP which applies a digital filter that improves the quality of a noisy image.


bool Imagick::medianFilterImage( float $radius )

Parameters: The function accepts a single parameter $radius which holds the radius of the pixel neighborhood.

Return Value: This function returns TRUE on success.

Errors/Exceptions: This function throws an ImagickException on error.

Below program illustrates the Imagick::medianFilterImage() function in PHP:


// Create a new imagick object
$imagick = new Imagick(
// Applying the digital filter to the image
header("Content-Type: image/jpg");
// Display the output image
echo $imagick->getImageBlob();



My Personal Notes arrow_drop_up
Recommended Articles
Page :