Trouble with LL in DWT2
3 visualizzazioni (ultimi 30 giorni)
After performing DWT
Image at LL is not same as output shown in matlab "wavelet tool box" after performing 1-level dwt
Not same Indicates: My output image looks brighter than matlab "wavelet tool box"
Wayne King il 29 Feb 2012
Hi Jagdeesh, you're not giving us enough to go on. The classic Lena image is not included in the Wavelet Toolbox as far as I am aware.
dwt2.m is a file in the Wavelet Toolbox, so I'm not sure what you mean that the output is not the same as shown in the Wavelet Toolbox.
Also, an image appearing "brighter" can just be a matter of colormap (scaling) so I think you need to be much clearer in your explanation of how you are viewing this image in the Wavelet Toolbox.
That looks like just a colormap (display) problem to me. But you do not provide the Lena file and you do not show your MATLAB commands. Please put your file somewhere and show your MATLAB commands.
UJJWAL il 1 Mar 2012
The problem is with your understanding of the Wavelet Theory. The yy which you are showing is basically the approximation matrix of the Lena Image. It is not the same as the original image. When you reconstruct that is upsampling and all through MRA using the approximation matrix and all the detail matrix (corresponding to horizontal , vertical and diagonal directions) then only you would get the original image.
In Wavelet toolbox , the output image is the reconstructed image while in ur code you are displaying the approximation image only. Hence your output is a brighter version of the original image. There is no problem with the program or the toolbox or the colormap. The problem is basically a conceptual one.
Hope this helps Happy to help UJJWAL
Why are you converting back to uint8 and then using imshow:
imagesc(LL); colormap gray;
UJJWAL il 2 Mar 2012
Ok. Now I understand. Previously i was thinking that maybe you are referring to the idwt image of the toolbox. My bad.
Actually the reason which i now realise is that , you are trying to plot the matrix LL which is the approximation matrix. However it contains many values outside the range of the colormap (like there are many values exceeding 255). Due to this when you directly imshow, those are sealed off to 255 and hence you see a considerably brighter image.
To solve this problem you will have to scale the data values so as to bring the values into the colormap of grayscale(that is 0 to 255). for that use imagesc function. The image will now be displayed properly