資源簡(jiǎn)介
本資源實(shí)驗(yàn)結(jié)果可以讓初學(xué)小波者很好的了解小波每層的分解和重構(gòu)過(guò)程,以便于進(jìn)行后續(xù)的研究。
代碼片段和文件信息
i1=imread(‘G:\tupian\girl2.bmp‘);
i=rgb2gray(i1);
figure(1);
subplot(221);
imshow(i);
title(‘原始圖像‘);
[cs]=wavedec2(i2‘haar‘);
a1=wrcoef2(‘a(chǎn)‘cs‘haar‘1);
a2=wrcoef2(‘a(chǎn)‘cs‘haar‘2);
subplot(223);
image(a1);
%colormap(map);
title(‘尺度1時(shí)的低頻圖像‘);
subplot(224);
image(a2);
title(‘尺度2時(shí)的低頻圖像‘);
%?從小波分解結(jié)構(gòu)[cs]在尺度為2時(shí)重構(gòu)高頻
hd2=wrcoef2(‘h‘cs‘haar‘2);
vd2=wrcoef2(‘v‘cs‘haar‘2);
dd2=wrcoef2(‘d‘cs‘haar‘2);
%繪制尺度2的高頻圖像
figure(2);
subplot(221);
imshow(hd2);
title(‘尺度為
評(píng)論
共有 條評(píng)論