To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
I have code
[C,S] = wavedec2(X,2,'haar');
for 2 level decomposition please tell how to display image in a single window,subplot must not be used
No products are associated with this question.
Have you read the documentation for image() recently ?
You have to select the particular coefficients you want from the wavedec2 output vector. You can use detcoef2 for that.
For example, to view the diagonal details, HH, at level two
X = imread('cameraman.tif'); [C,S] = wavedec2(X,2,'haar'); [H,V,D] = detcoef2('all',C,S,2); imagesc(D); colormap gray
appcoef2() gives you the scaling coefficients
Then you can simply do:
X = imread('cameraman.tif'); [C,S] = wavedec2(X,2,'haar'); A2 = appcoef2(C,S,'haar',2); [H1,V1,D1] = detcoef2('all',C,S,1); [H2,V2,D2] = detcoef2('all',C,S,2);
Now you have all the images in your plot.
imagesc(A2); colormap gray;
gives you the image in the upper left corner and you have the 6 detail images. H1,V1,and D1 for level 1 and H2,V2, and D2 for level 2.