Displaying the image of wavedec2

6 次查看(过去 30 天)
FIR
FIR 2012-12-24
回答: D.Regan 2014-1-30
I have code
X=imread('cameraman.tif')
[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

回答(4 个)

Walter Roberson
Walter Roberson 2012-12-24
Have you read the documentation for image() recently ?
  2 个评论
FIR
FIR 2012-12-24
yes image(C)or S is giving a straight line
Walter Roberson
Walter Roberson 2012-12-24
You indicated that you must display the images in a single window and that subplot must not be used. There is a way to position images in an axes; examine the possible input arguments for image() for details.

请先登录,再进行评论。


Wayne King
Wayne King 2012-12-24
编辑:Wayne King 2012-12-24
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

Wayne King
Wayne King 2012-12-24
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.

D.Regan
D.Regan 2014-1-30
Hi Sir,
I want to see the four bands LL, LH, HL and HH separately after wavedec2(), How can i do this?

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by