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

1
2
3
4
5
6
7
8
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('重构图像');

  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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对角高频重构');

  

posted @   夕西行  阅读(3962)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示