# How to threshold wavelet coefficients of an image using higher order statastics (skewness, kurtosis)

2 views (last 30 days)
santhosh kumar buddepu on 20 May 2021
Iam able to decompose wavelets into required level with different wavelets but thresholding of detailed coefficients by using skewness , kurtosis are unable to perform can you please help me how to threshold coefficients using higher order statistics using Matlab

Sai Pavan on 29 May 2024
Hello Santhosh,
I understand that you want to know the procedure to threshold detailed coefficients after performing wavelet decomposition using higher order statistics.
• Decompose the image into its wavelet coefficients based on the chosen level.
• Calculate the skewness and kurtosis of the wavelet coefficients.
• The thresholds can be defined in various ways depending on the skewness and kurtosis values. A simple approach is to set the threshold as a function of the standard deviation of the coefficients, modulated by the skewness and kurtosis as they are used identify how the coefficients' distribution deviates from a normal distribution.
• Use the thresholds to zero out coefficients that are considered insignificant.
• Additionally, after modifying the coefficients, we can reconstruct the image using the inverse wavelet transform.
Please refer to the below code snippet that illustrates the above workflow:
% Perform a 2-level wavelet decomposition
[c,s] = wavedec2(I, 2, 'db1');
% For example, extract the detail coefficients at level 2
[H1,V1,D1] = detcoef2('all', c, s, 1);
[H2,V2,D2] = detcoef2('all', c, s, 2);
% Calculate skewness and kurtosis for each set of detail coefficients
skewnessH2 = skewness(H2(:));
kurtosisH2 = kurtosis(H2(:));
skewnessV2 = skewness(V2(:));
kurtosisV2 = kurtosis(V2(:));
skewnessD2 = skewness(D2(:));
kurtosisD2 = kurtosis(D2(:));
% Example threshold calculation
thresholdH2 = std(H2(:)) * (1 + skewnessH2) * (1 + kurtosisH2 - 3);
thresholdV2 = std(V2(:)) * (1 + skewnessV2) * (1 + kurtosisV2 - 3);
thresholdD2 = std(D2(:)) * (1 + skewnessD2) * (1 + kurtosisD2 - 3);
% Apply thresholds
H2(abs(H2) < thresholdH2) = 0;
V2(abs(V2) < thresholdV2) = 0;
D2(abs(D2) < thresholdD2) = 0;
Hope it helps!
santhosh kumar buddepu on 29 May 2024
The rsponse is very much useful, but we cannot expect this much delay, three years back i have posted this question, literally i also forgot the instance. we are expecting fast responses from Mathworks. Thank you