MeanShiftFilter

MeanShiftFilter[data,r,d]

filters data by replacing every value by the mean of the pixels in a range-r neighborhood and whose value is within a distance d.

MeanShiftFilter[data,{r1,r2,},d]

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

Details and Options

  • MeanShiftFilter is used to locally smooth data and diminish noise, while preserving significant jumps such as edges in images, where the amount of smoothing is dependent on the values of r and d.
  • The function applied to each range-r neighborhood is MeanShift.
  • 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, MeanShiftFilter operates separately on each channel.
  • MeanShiftFilter[data,{r1,r2,},d] computes the mean shift value in blocks centered on each sample.
  • MeanShiftFilter assumes the index coordinate system for lists and images.
  • At the data boundaries, MeanShiftFilter uses smaller neighborhoods.
  • The following options can be given:
  • DistanceFunctionEuclideanDistancehow to compute the distance between values
    MaxIterations1maximum number of iterations to be performed
  • For a complete list of possible settings for DistanceFunction, see the reference page for MeanShift.
  • The possible range for the distance parameter d depends on the distance function as well as the dimension of the color space.

Background & Context

Examples

open allclose all

Basic Examples  (3)

Mean-shift filtering of a vector:

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

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

Mean-shift filtering of a color image:

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

Scope  (11)

Options  (3)

Applications  (2)

Properties & Relations  (1)

Neat Examples  (1)

See Also

MeanFilter  MeanShift  BilateralFilter  GuidedFilter  TrimmedMean

Introduced in 2010
(8.0)
| Updated in 2016
(11.0)