多尺度二维离散小波重构waverec2

clc,clear all,close all;
load woman;
[c,s]=wavedec2(X,2,'haar');%进行2尺度二维离散小波分解。分解小波函数haar
%多尺度二维离散小波重构(逆变换)
Y=waverec2(c,s,'haar');
figure;
subplot(1,2,1),imshow(X,map),title('原始图像');
subplot(1,2,2),imshow(Y,map),title('重构图像');

  

a1=wrcoef2('a',c,s,'haar',1);%尺度1低频重构
a2=wrcoef2('a',c,s,'haar',2);
figure;
subplot(1,2,1),imshow(uint8(a1)),title('尺度1低频重构');
subplot(1,2,2),imshow(uint8(a2)),title('尺度2低频重构');
h1=wrcoef2('h',c,s,'haar',1);
v1=wrcoef2('v',c,s,'haar',1);
d1=wrcoef2('d',c,s,'haar',1);
h2=wrcoef2('h',c,s,'haar',2);
v2=wrcoef2('v',c,s,'haar',2);
d2=wrcoef2('d',c,s,'haar',2);
figure;
subplot(1,3,1),imshow(uint8(h1)),title('尺度1水平高频重构');
subplot(1,3,2),imshow(uint8(v1)),title('尺度1竖直高频重构');
subplot(1,3,3),imshow(uint8(d1)),title('尺度1对角高频重构');
figure;
subplot(1,3,1),imshow(uint8(h2)),title('尺度2水平高频重构');
subplot(1,3,2),imshow(uint8(v2)),title('尺度2竖直高频重构');
subplot(1,3,3),imshow(uint8(d2)),title('尺度2对角高频重构');

  

转载于:https://www.cnblogs.com/xixixing/p/5827680.html

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值