小波阈值去噪matlab程序 %设置信噪比和随机种子值 snr=7; init=2055615866; %产生原始信号sref和被高斯白噪声污染的信号s [sref,s]=wnoise(1,11,snr,init); %用sym8小波对信号s进行3层分解并对细节系数 %选用SURE阈值模式和尺度噪声 xd=wden(s,'heursure','s','one',3,'sym8'); %对上述信号进行图示 figure(1); plot(sref);title('参考信号'); figure(2); plot(s);title('染噪信号'); figure(3); plot(xd);title('消噪信号')
clear all;
close all;
clc;
load leleccum
% 截取信号
s = leleccum(1:3920);
l_s = length(s);
[C,L] = wavedec(s,3,'db1');
cA3 = appcoef(C,L,'db1',3);
cD3 = detcoef(C,L,3);
cD2 = detcoef(C,L,2);
cD1 = detcoef(C,L,1);
A3 = wrcoef('a',C,L,'db1',3);
% 从C中重建1、2、3层细节
D1 = wrcoef('d',C,L,'db1',1);
D2 = wrcoef('d',C,L,'db1',2);
D3 = wrcoef('d',C,L,'db1',3);
figure
subplot(2,2,1); plot(A3);
title( 'Approximation A3' )
subplot(2,2,2); plot(D1);
title( 'Detail D1' )
subplot(2,2,3); plot(D2);
title( 'Detail D2' )
subplot(2,2,4); plot(D3);
title( 'Detail D3' )
figure
subplot(2,1,1);plot(s);title('Original'); axis off
subplot(2,1,2);plot(A3);title('Level 3 Approximation');
axis off
clear all;
load facets;
subplot(2,2,1);image(X);
colormap(map);
xlabel(‘(a)原始图像’);
axis square
%产生含噪声图像
init = 2055615866;
randn(‘seed’,init);
x = X + 50*randn(size(X));
subplot(2,2,2);image(x);
colormap(map);
xlabel(‘(b)含噪声图像’);
axis square
%下面进行图像的去噪处理
%用小波函数coif3对x进行2层小波分解
[c,s] = wavedec2(x,2,‘coif3’);
%提取小波分解中第一层的低频图像,即实现了低通滤波去噪
%设置尺度向量
n = [1,2];
%设置阈值向量p
p = [10.12,23.28];
%对三个方向高频系数进行阈值处理
nc = wthcoef2(‘h’,c,s,n,p,‘s’);
nc = wthcoef2(‘v’,nc,s,n,p,‘s’);
nc = wthcoef2(‘d’,nc,s,n,p,‘s’);
%对新的小波分解结构[c,s]进行重构
x1 = waverec2(nc,s,‘coif3’);
subplot(2,2,3);image(x1);
colormap(map);
xlabel(‘(c)第一次去噪图像’);
axis square
%对nc再次进行滤波去噪
xx = wthcoef2(‘v’,nc,s,n,p,‘s’);
x2 = waverec2(xx,s,‘coif3’);
subplot(2,2,4);image(x2);
colormap(map);
xlabel(‘(d)第二次去噪图像’);
axis square《span style=“font-size:14px”》《span style=“font-size:14px”》《span style=“font-size:18px; color:#3366ff”》
小波去噪matlab程序.rar_MATLAB 小波去噪_shoreyog_信噪比程序_小波 阈值_小波去噪
版权申诉
5星 · 超过95%的资源 156 浏览量
2022-07-15
20:20:14
上传
评论
收藏 1KB RAR 举报
朱moyimi
- 粉丝: 61
- 资源: 1万+
最新资源
- ESP8266单片机开发5套件
- Matlab深度学习工具箱工具包(6个)
- Python + MySQL 0基础从入门到精通 MySQL数据库实战精讲教程课件(5节)
- Unity开发的2.5D飞机大战游戏(源文件)
- 大数据BI可视化(Echarts组件)项目开发-熟悉结合Vue开发图表组件7.0附带1/6商家销售统计(横向柱状图)
- python《基于tensorflow 实现的用textcnn方法做情感分析的项目,有数据,可以直接跑》+源代码+设计资料
- HP-P1008打印机linux驱动
- Unity3D的http网络层封装,以json格式为数据格式,封装web网络层
- Jupyter Notebook《基于协同过滤算法和基于TensorFlow建立推荐系统》+源代码+设计资料
- 苹果系统的HEIC图片转JPG
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论15