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 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:
-
list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an Audio 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 allBasic Examples (3)
Scope (12)
Data (7)
Parameters (5)
Specify one radius to be used in all directions:
Increasing the radius will result in smoother images:
Mean filtering just in the first direction:
Mean filtering of a 3D image in the vertical direction only:
Filtering of the horizontal planes only:
Use a quantity parameter with a TimeSeries input:
Applications (3)
Use MeanFilter to smooth a time series and identify the trend:
Properties & Relations (5)
Compare filtering results using geometric, harmonic and standard mean filters:
For positive data, HarmonicMeanFilter[data,r]≤GeometricMeanFilter[data,r]≤MeanFilter[data,r]:
MeanFilter is equivalent to ListConvolve with a moving-average filter of length , if samples are removed from the border:
However, ListConvolve is substantially faster:
MeanFilter is a frequency-selective filter with a lowpass characteristic:
Use MedianFilter to avoid excessive edge blurring:
Text
Wolfram Research (2008), MeanFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanFilter.html (updated 2016).
CMS
Wolfram Language. 2008. "MeanFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/MeanFilter.html.
APA
Wolfram Language. (2008). MeanFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeanFilter.html