0

我使用下面的代码在小波中分解我的图像。但我希望详细的系数('h'、'v' 和 'd')是一个文件,而不是 3 个不同的图像。

X=imread('snow.tif');
close all
clf
image(X)
colormap('default')
axis ('image'); set(gca,'XTick',[],'YTick',[]); title('Original')
pause

dwtmode('sym')
wname = 'bior4.4'

t = wtree(X,2,'bior4.4');
plot(t)
pause
close(2)

[wc,s] = wavedec2(X,5,wname);

a1 = appcoef2(wc,s,wname,1);         
h1 = detcoef2('h',wc,s,1);           
v1 = detcoef2('v',wc,s,1);           
d1 = detcoef2('d',wc,s,1);           

a2 = appcoef2(wc,s,wname,2);
h2 = detcoef2('h',wc,s,2);
v2 = detcoef2('v',wc,s,2);
d2 = detcoef2('d',wc,s,2);
4

0 回答 0