Thresholds for wavelet 2-D using Birgé-Massart strategy
returns level-dependent thresholds
nkeep] = wdcbm2(
thr and numbers of coefficients
to be kept
nkeep, for denoising or compressing an image.
wdcbm2 uses a wavelet coefficients selection rule based on the
Birgé-Massart strategy to obtain the thresholds.
[ is the wavelet
decomposition structure of the image to be denoised or compressed, at level
M are real numbers greater than 1.
is equivalent to
Compress Image Using Birgé-Massart Strategy
Load an image.
load detfingr nbc = size(map,1);
Obtain the wavelet decomposition of the image at level 3 using the
wname = "sym4"; lev = 3; [c,s] = wavedec2(X,lev,wname);
wdcbm2 to select level-dependent thresholds for image compression. Use the suggested parameters.
alpha = 1.5; m = 2.7*prod(s(1,:)); [thr,nkeep] = wdcbm2(c,s,alpha,m)
thr = 3×3 21.4814 46.8354 40.7907 21.4814 46.8354 40.7907 21.4814 46.8354 40.7907
nkeep = 1×3 624 961 1765
wdencmp2 for compressing the image using the thresholds. Use hard thresholding.
[xd,cxd,sxd,perf0,perfl2] = ... wdencmp("lvd",c,s,wname,lev,thr,"h");
Plot the original and compressed images.
colormap(pink(nbc)) subplot(2,2,1) image(wcodemat(X,nbc)) title("Original Image") subplot(2,2,2) image(wcodemat(xd,nbc)) title("Compressed Image") xlab1 = ['2-norm rec.: ',num2str(perfl2)]; xlab2 = [' % -- zero cfs: ',num2str(perf0), ' %']; xlabel([xlab1 xlab2]);
C — Wavelet decomposition
alpha — Sparsity parameter
Sparsity parameter to use in the Birgé-Massart strategy, specified as a
real-valued scalar greater than 1. Typically,
for compression and
for denoising. For more information, see Wavelet Coefficients Selection.
M — Factor
prod( | real-valued scalar
Factor to use in the Birgé-Massart strategy, specified as a real-valued scalar
greater than 1. The default value is
prod(, the length of the
coarsest approximation coefficients. Recommended values for
6*prod(. For more
information, see Wavelet Coefficients Selection.
thr — Level-dependent thresholds
Level-dependent thresholds, returned as a 3-by-
N = size(.
thr(:,i) contains the thresholds in
the three orientations: horizontal, diagonal, and vertical, for level
i. The thresholds are obtained using a wavelet coefficients
selection rule based on the Birgé-Massart strategy. For more information, see
Wavelet Coefficients Selection.
nkeep — Number of coefficients
Number of coefficients to be kept at each level, returned as a vector of length
nkeep(i) contains the number of
coefficients to be kept at level i.
Wavelet Coefficients Selection
Thresholds are obtained using a wavelet coefficients selection rule
based on the Birgé-Massart strategy. The values
alpha define the strategy.
N+1(and coarser levels), everything is kept.
For level i from 1 to
N, the ni largest coefficients are kept, where
ni = M / (N+2-i).
The default value of
corresponds to the formula
nN+1 = .
 Birgé, Lucien, and Pascal Massart. “From Model Selection to Adaptive Estimation.” In Festschrift for Lucien Le Cam: Research Papers in Probability and Statistics, edited by David Pollard, Erik Torgersen, and Grace L. Yang, 55–87. New York, NY: Springer, 1997. https://doi.org/10.1007/978-1-4612-1880-7_4.
Introduced before R2006a