WaveletThreshold

WaveletThreshold[dwd]
thresholds the detail wavelet coefficients in the DiscreteWaveletData object dwd.

WaveletThreshold[dwd, tspec]
thresholds the coefficients using the thresholding specification tspec.

WaveletThreshold[dwd, tspec, wind]
thresholds the wavelet coefficients given by the wavelet indices wind.

DetailsDetails

  • WaveletThreshold[dwd] is effectively WaveletThreshold[dwd, "Universal"].
  • WaveletThreshold[dwd, tspec, wind] indicates which wavelet coefficients to threshold, using the same index convention as described for DiscreteWaveletData.
  • By default, thresholding is performed on detail coefficients at each refinement level.
  • The threshold specification tspec can be of the form: tfun, .
  • Possible tfun names and options include:
  • {"Hard",}0 TemplateBox[{x}, Abs]<=delta; x TemplateBox[{x}, Abs]>delta
    {"Soft",} 0 TemplateBox[{x}, Abs]<=delta; sgn(x) (TemplateBox[{x}, Abs]-delta) TemplateBox[{x}, Abs]>delta;
    {"Firm",,r,p} 0 TemplateBox[{x}, Abs]<=delta-delta p r; (sgn(x) (delta+delta r-delta p r) (TemplateBox[{x}, Abs]-delta+delta p r))/(delta r) delta-delta p r<TemplateBox[{x}, Abs]<=delta+delta (-p) r+delta r; x TemplateBox[{x}, Abs]>delta+delta (-p) r+delta r;
    {"PiecewiseGarrote",}0 TemplateBox[{x}, Abs]<=delta; x-(delta^2)/x TemplateBox[{x}, Abs]>delta
    {"SmoothGarrote",,n}
    {"Hyperbola",delta} 0 TemplateBox[{x}, Abs]<=delta; sgn(x) sqrt(x^2-delta^2) TemplateBox[{x}, Abs]>delta;
    {"LargestCoefficients",k}keep the largest k coefficients
  • In all cases is assumed to be a positive number or a thresholding function tfunc to compute . Each should return a positive number.
  • The parameter conditions for are that is a positive real and a positive real number between 0 and 1.
  • The parameter conditions for are to have be a positive real number.
  • The threshold can be automatically computed using the following methods:
  • Automatic thresholding value
    {"FDR",}false discovery rate at significance level
    "GCV"minimizes generalized cross-validation function
    "GCVLevel" performed at each level
    "SURE"Stein's unbiased risk estimate
    "SUREHybrid"combination of and thresholding
    "SURELevel" performed at each level
    "Universal"Donoho and Johnstone's universal threshold
    "UniversalLevel" performed at each level
  • The parameter conditions for are that should be a number between 0 and 1. By default is equivalent to .
  • The following short tspec forms can be used:
  • "FDR"
    "GCV"
    "GCVLevel"
    "SURE"
    "SURELevel"
    "SUREShrink"
    "Universal"
    "UniversalLevel"
    "VisuShrink"
    "VisuShrinkLevel"

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

DiscreteWaveletTransform of noisy data:

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

Smooth data by thresholding wavelet coefficients:

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

Compare original and smoothed data:

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

Remove noise from a color image:

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

Threshold wavelet coefficients:

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

Synthesize smoothed image using InverseWaveletTransform and compare with original:

In[4]:=
Click for copyable input
Out[4]=
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »