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"
No products are associated with this question.
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.
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:
y=imread('lena.jpg'); x=rgb2gray(y); [LL,LH,HL,HH]=dwt2(x,'haar'); imagesc(LL); colormap gray;
The image which i have reffered and my o/p image both are approxiamation image. It's definetly not reconstructed one.
If u need more calrification look at below link
Hope u can understand problem and suggest me a better solution
use wavemenu command to load an image.
because difference in type original image is "uint8" and after dwt2 image is "double". u need to definetly convert uint8 otherwise u get a "white image wit 2 spots on it".
Pls see the difference and suggest me a better solution
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