MedianFilter

MedianFilter[image,r]
filters image by replacing every value by the median in its range-r neighborhood.

MedianFilter[data,r]
applies median filtering to an array of data.

DetailsDetails

  • MedianFilter works with arbitrary-rank numerical arrays, regular and irregular time series, 2D and 3D images, and sampled sound objects, operating separately on each channel.
  • For multichannel images, MedianFilter[image,] replaces each pixel by a pixel in its neighborhood that has the median total intensity, averaged over all channels.
  • MedianFilter[image,r] finds the median in blocks centered on each pixel.
  • At the edges of an image, MedianFilter uses smaller neighborhoods.
  • MedianFilter works with 3D as well as 2D images, and also with data arrays of any rank.
  • MedianFilter[image,{rrow,rcol}] uses range rrow in height, and rcol in width.
  • MedianFilter[image,{rslice,rrow,rcol}] uses range rslice in height, rrow in depth, and rcol in width.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Median filter of a vector:

In[1]:=
Click for copyable input
Out[1]=

Median filter of an image:

In[1]:=
Click for copyable input
Out[1]=

Median filter of a 3D image:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2008
(7.0)
| Updated in 2015
(10.2)
Translate this page: