I applied the discrete wavelet transform to an image using dwt2
and displayed the LL
component. It shows a brighter image instead of a blurred image. Can anyone please tell me why it is brighter?
My code is:
I=im2double(imread('lena1.jpg'));
[LL,LH,HL,HH] = dwt2(I,'db1');
imshow(LL);
The reason why is because the LL
component most likely has values that go beyond 1 since you converted with im2double
. When trying to display that image, try doing this instead:
imshow(LL, []);
This will map the lowest value to 0 and the highest value to 255 and scaling everything linearly in between. Note that this won't change the actual LL
variable. imshow
with []
as the second parameter will internally scale the intensities so that the values get mapped between [0,255]
respectively.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.