CommonestFilter

CommonestFilter[data,r]

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

CommonestFilter[data,{r1,r2,}]

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

Details

  • CommonestFilter, also known as majority filter, is used to filter data by returning the commonest local value, where the extent of the effect is dependent on the value of r.
  • The function applied to each range-r neighborhood is Commonest.
  • 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 object
  • For multichannel images and audio signals, CommonestFilter operates separately on each channel.
  • CommonestFilter[data,{r1,r2,}] computes the commonest value in blocks centered on each sample.
  • CommonestFilter assumes the index coordinate system for lists and images.
  • At the data boundaries, CommonestFilter uses smaller neighborhoods.

Examples

open allclose all

Basic Examples  (3)

Apply a majority filter to a vector of numbers:

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

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]=

Commonest filtering of a color image:

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

Scope  (11)

Applications  (2)

Properties & Relations  (1)

Possible Issues  (1)

Neat Examples  (1)

See Also

Commonest  MedianFilter  MaxFilter  EntropyFilter  ImageFilter  CellularAutomaton

Tutorials

Introduced in 2008
(7.0)
| Updated in 2012
(9.0)