This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# WaveletThreshold

 WaveletThreshold[dwd] thresholds the detail wavelet coefficients in the DiscreteWaveletData object dwd. WaveletThresholdthresholds the coefficients using the thresholding specification tspec. WaveletThresholdthresholds the wavelet coefficients given by the wavelet indices wind.
• 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",} {"Soft",} {"Firm",,r,p} {"PiecewiseGarrote",} {"SmoothGarrote",,n} {"Hyperbola",} {"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"
Smooth data by thresholding wavelet coefficients:
Compare original and smoothed data:
Remove noise from a color image:
Threshold wavelet coefficients:
Synthesize smoothed image using InverseWaveletTransform and compare with original:
Smooth data by thresholding wavelet coefficients:
 Out[3]=
Compare original and smoothed data:
 Out[4]=

Remove noise from a color image:
Threshold wavelet coefficients:
 Out[3]=
Synthesize smoothed image using InverseWaveletTransform and compare with original:
 Out[4]=
 Scope   (12)
The result is a new DiscreteWaveletData object representing thresholded coefficients:
Specify thresholding method:
Use specific threshold function:
Also specify how to choose threshold value:
Inverse transform and compare:
Visualize the effect on wavelet coefficients:
Compare using WaveletListPlot:
Perform thresholding on specific wavelet indexes:
By default only the detail coefficients are thresholded:
Use Automatic to threshold coefficients used in the inverse transform:
Use All to threshold all coefficients:
Use to fully control which coefficients to threshold:
Compare the resulting coefficients:
Smooth noisy data using automatic thresholding methods:
Compare all named automatic thresholding methods tspec:
Choose specific thresholding function tfun to apply:
Reconstruct data from thresholded coefficients with automatically chosen threshold value:
Use a named method to automatically compute the threshold value :
Reconstruct data after thresholding with various threshold value selection methods:
Use a specific numerical threshold value :
The best smoothing occurs for threshold values that are similar to the scale of the noise:
Use a function to compute a threshold value :
Threshold all coefficients below the standard deviation:
Plot the effect of thresholding function tfun on coefficient values ranging from -0.5 to 0.5:
Apply thresholding separately at each refinement level to data varying on different scales:
Different methods for selecting separate threshold values at each level:
Compare with methods that choose one threshold value for all levels:
Perform thesholding by specifying a function and wavelet index to compute :
Threshold all detail coefficients below the standard deviation:
Use FindThreshold to compute thresholding values:
Specifying a thresholding function computes level-dependent thresholding values:
 Applications   (8)
Data processing pipeline for simple automatic smoothing:
Denoise 1D data:
Denoise 2D data:
Add normally distributed noise with standard deviation :
Compare effectiveness of automatic smoothing for different noise levels:
Threshold specific components of an image:
Strongly threshold horizontal and vertical detail coefficients only:
Compare coefficients:
The inverse transform image has mainly diagonal features:
Plot the noise subtracted by different thresholding functions tfun with automatic threshold value:
Subtract smoothed data from original data (giving a noise model):
Compare performance of automatic thresholding methods when smoothing noisy data:
Quantify performance using SNR (signal-to-noise ratio) and peak SNR in decibels (dB):
Smooth by applying thresholding method th to detail coefficients :
Compare all named automatic thresholding methods; higher value is better:
Plot smoothed data together with perfectly noise-free data:
thresholding value:
The mean absolute deviation is computed using detail coefficients at first refinement level :
Compute universal threshold value as and perform a threshold:
Use WaveletThreshold to compute the threshold value:
Compare threshold values:
thresholding value:
Compute threshold values :
Use WaveletThreshold to compute threshold value:
Compare threshold values:
thresholding value:
Estimate noise level:
For each wavelet coefficient , find its two-sided -value :
Order the according to their size . Find , where is the significance level:
Compute threshold as :
Use WaveletThreshold to compute threshold value:
Compare threshold values:
Thresholding functions approach Identity for small threshold values :
thresholding is similar to Chop:
Data values with absolute value below threshold are set to 0:
thresholding performs a shrinking operation:
Data values below a certain threshold are set to 0; those above are "shrunk" by :
thresholding:
Parameter () controls the range over which firm thresholding interpolates between and Identity. Parameter () controls where lies between and , with by default.
Different settings for :
Different settings for :
Different settings for :
thresholding is a compromise between and thresholding:
thresholding has uniformly smaller variance than thresholding:
In the limit , threshold performs thresholding:
In the limit , threshold performs thresholding:
thresholding:
This is similar to thresholding with the advantage of having a single parameter :
thresholding:
In the limit , goes to thresholding:
thresholding:
Use WaveletMapIndexed to perform thresholding:
Using thresholding function with thresholding value:
Noise coefficients may pass through thresholding:
thresholding function shrinks these spurious peaks:
The noise estimate is computed based on first-level detail coefficients:
A warning is generated if the estimated noise level is :
WaveletThreshold does not operate on non-numeric wavelet coefficients:
New in 8