BandstopFilter

BandstopFilter[data,{ω1,ω2}]
applies a bandstop filter with cutoff frequencies and to an array of data.

BandstopFilter[data,{ω1,ω2},n]
uses a filter kernel of length n.

BandstopFilter[data,{ω1,ω2},n,wfun]
applies a smoothing window wfun to the filter kernel.

BandstopFilter[image,]
applies a bandstop filter to image.

BandstopFilter[sound,]
applies a bandstop filter to sampled sound object.

Details and OptionsDetails and Options

  • BandstopFilter works with arbitrary-rank numerical arrays, 2D and 3D images, and sampled sound objects, operating separately on each channel.
  • When applied to images and multidimensional arrays, filtering is applied successively to each dimension starting at level 1. BandstopFilter[data,{{ω11,ω21},}] uses the frequency for the i^(th) dimension.
  • The frequency values should be between 0 and .
  • BandstopFilter[data,{ω1,ω2}] uses a filter kernel length and smoothing window suitable for the cutoff frequencies and the input data.
  • Typical smoothing windows wfun include:
  • BlackmanWindowsmoothing with a Blackman window
    DirichletWindowno smoothing
    HammingWindowsmoothing with a Hamming window
    {v1,v2,}use a window with values
    fcreate a window by sampling f between and
  • Possible sound objects include:
  • SampledSoundList[{a1,a2,},r]amplitude levels given in a list
    SampledSoundFunction[f,n,r]amplitude levels generated by a function
    Sound[prims,]excluding SoundNote objects in prims
  • The following options can be given:
  • Padding"Fixed"the padding value to use
    SampleRateAutomaticsample rate assumed for the input
  • By default, SampleRate->1 is assumed for images as well as data. For sampled sound objects with sample rate r, SampleRate->r is used.
  • With SampleRate->r, the cutoff frequency should be between 0 and r×.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Bandstop filter a unit step sequence:

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

Bandstop filtering of a sinusoidal sequence:

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

Bandstop filtering of an image:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)
| Updated in 2014
(10.0)