MeanFilter

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

MeanFilter[data, r]
applies mean filtering to an array of data.

DetailsDetails

  • MeanFilter works with arbitrary grayscale and multichannel images, as well as numerical arrays.
  • MeanFilter operates separately on each channel in an image.
  • MeanFilter[image, r] computes the mean value in × blocks centered on each pixel.
  • At the edges of an image, MeanFilter uses smaller neighborhoods.
  • MeanFilter works with 3D as well as 2D images, and also with data arrays of any rank.
  • MeanFilter[image, {rrow, rcol}] uses range in height, and in width.
  • MeanFilter[image, {rslice, rrow, rcol}] uses range in height, in depth, and in width.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Mean filtering of a color photo:

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

Denoise an ultrasound image with mean filtering:

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

Mean filter of a vector:

In[1]:=
Click for copyable input
Out[1]=
New in 7 | Last modified in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »