I am studying wavelet theory by myself and hope to use wavelet to denoise images. I write one matlab program to watch denoised image.
Gray = ones(512, 512, 'uint8'); Gray = Gray.*128; Gray = imnoise(Gray, 'gaussian', 0, 0.01); [cA1, cH1, cV1, cD1] = dwt2(Gray, 'db1'); [cA2, cH2, cV2, cD2] = dwt2(cA1/2, 'db1'); [cA3, cH3, cV3, cD3] = dwt2(cA2/2, 'db1'); [cA4, cH4, cV4, cD4] = dwt2(cA3/2, 'db1'); [cA5, cH5, cV5, cD5] = dwt2(cA4/2, 'db1'); figure; imshow(cA1/2, [0, 255]); figure; ismhow(cA2/2, [0, 255]); figure; ismhow(cA3/2, [0, 255]); figure; ismhow(cA4/2, [0, 255]); figure; ismhow(cA5/2, [0, 255]);
I find cA3 contains a lot of noise even if three decompositions have been performed. If I increase noise level, I need to perform more decomposition to obtain one smooth image in the approximation coefficients. If number of wavelet decomposition level is big, modifications of detail coefficients of high decomposition level will affect a lot of pixels and edges may be smoothed. I try to change wavelet family,but the problem still occurs. By the way, the function dwt2 seems to magnify the values of approximation coefficients by 2. Why does dwt2 behave like that?