MeanFilter

MeanFilter[data,r]

filters data by replacing every value by the mean value in its range-r neighborhood.

MeanFilter[data,{r1,r2,}]

uses ri for filtering the ^(th)dimension in data.

Details

  • MeanFilter is used to locally smooth data and diminish noise, where the amount of smoothing is dependent on the value of r.
  • The function applied to each range-r neighborhood is Mean.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries, TemporalData,
    imagearbitrary Image or Image3D object
    audioan Audio or Sound object
  • For multichannel images and audio signals, MeanFilter operates separately on each channel.
  • MeanFilter[data,{r1,r2,}] computes the mean value in blocks centered on each sample.
  • MeanFilter assumes the index coordinate system for lists and images.
  • At the data boundaries, MeanFilter uses smaller neighborhoods.

Examples

open allclose all

Basic Examples  (4)

Mean filtering of a list:

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

Mean filtering of a 2D array:

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

Filter a TimeSeries:

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

Filter an image:

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

Scope  (11)

Applications  (2)

Properties & Relations  (3)

See Also

MovingAverage  Mean  MeanShiftFilter  MedianFilter  GuidedFilter  ImageConvolve  CellularAutomaton

Tutorials

Introduced in 2008
(7.0)
| Updated in 2016
(11.0)