calculate multi-level DWT of an image
9 views (last 30 days)
Show older comments
am Traying to caclulate the 4th level of discrete wavelet transform (dwt2) of an image to get the LL band of this level I tried the old fation way beacsue am a new to matlab the prblem that the numbers should be between 0-255 but instead its keep growing as the image below what is the prblem and is there a faster way to do this?
I2 = imresize(image,[256 256])
[cA1,~,~,~] = dwt2(I2,'haar')
[cA2,~,~,~] = dwt2(cA1,'haar')
[cA3,~,~,~] = dwt2(cA2,'haar')
[cA4,~,~,~] = dwt2(cA3,'haar')
0 Comments
Answers (1)
KALYAN ACHARJYA
on 19 Jan 2021
"the numbers should be between 0-255"
No, pixel values depend on the data types, the original image probably uint8 data type, and the decomposition results (LL,LH, HL, and HH) are probably double. The value is changing due to the kernels used in the DTW case. Suppose for the case of LL, the image goes through LPF and downsampling 2 times, both steps affecting the values on the image data. Red the following link for more detail about uint8 and double precision data type
Hope this clarifies your doubt.
See Also
Categories
Find more on Discrete Multiresolution Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!