單尺度二維離散小波重構(逆變換)idwt2


clc,clear all,close all;
load woman;
%單尺度二維離散小波分解。分解小波函數haar
[cA,cH,cV,cD]=dwt2(X,'haar');
%單尺度二維離散小波重構(逆變換)
Y=idwt2(cA,cH,cV,cD,'haar');
figure;
subplot(1,2,1),imshow(X,map),title('原始圖像');
subplot(1,2,2),imshow(Y,map),title('重構圖像');

  

clear all;close all;clc;
I=imread('C:\Users\Jv\Desktop\wenli.jpg');
gray=I;
X=double(gray);
[cA,cH,cV,cD]=dwt2(X,'haar');
%單尺度二維離散小波低、高頻重構(逆變換)
a=idwt2(cA,[],[],[],'haar');
h=idwt2([],cH,[],[],'haar');v=idwt2([],[],cV,[],'haar');d=idwt2([],[],[],cD,'haar');
figure;
subplot(1,2,1),imshow(uint8(X)),title('原圖');
subplot(1,2,2),imshow(uint8(a)),title('低頻重構圖');
figure;
subplot(1,3,1),imshow(uint8(h)),title('水平高頻重構圖');
subplot(1,3,2),imshow(uint8(v)),title('豎直高頻重構圖');
subplot(1,3,3),imshow(uint8(d)),title('對角高頻重構圖');

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM