0

以下のコードを使用して、画像をウェーブレットに分解しました。しかし、詳細な係数 ('h'、'v'、および 'd') を 3 つの異なる画像としてではなく、1 つのファイルにする必要があります。

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