当前位置: 首页 > news >正文

基于改进高斯-拉普拉斯滤波器的一维时间序列平滑与降噪(MATLAB)

以图像处理为例,拉普拉斯算子是基于图像的二阶导数来找到边缘并搜索过零点,传统的拉普拉斯算子常产生双像素宽的边缘,对于较暗区域中的亮斑进行边缘检测时,拉普拉斯运算就会使其变得更亮。因此,与梯度算子一样,拉普拉斯算子不能抑制图像的噪声。如果有一种算子能够将高斯平滑滤波器与拉普拉斯算子结合起来,在进行边缘检测之前先平滑掉噪声,一定能够取得良好的效果,因此,高斯—拉普拉斯算子被提出。鉴于此,采用一种改进的高斯-拉普拉斯滤波器对一维时间序列进行平滑与降噪,运行环境为MATLAB R2018,测试了地震信号,微震信号。

clc
clear 
close all
%load Input example
load mport1-1.txt
x=mport1_1';
% Sigma and Filter Order 
% Tune sigma, and N according to the application you want to use.
sigma = 0.5;
N = 10;
% For More Scaling dividing by sigma.
[Gaussian_1D_2_Diff_Modified]=IGLF(sigma,N) /sigma;
% Filtering The Input (Denoising the Input Signal)
Output = filter (Gaussian_1D_2_Diff_Modified,1,x);
% Output Squaring 
Output = Output.^2;
% For more smoothing, average movabale window is obatined for m samples
% with k stride (moving by k samples)
% Adjustce m, and k according to the application you want to use.
Output_More_Smoothing = zeros(1,size(x,2));
m = 8;
k = 1;
count = 1;for j=1:k:(length(Output))-max([m k])Output_More_Smoothing(count)=(mean(Output(j:j+m-1)));count = count +1;end% Plotting 
% Plotting the Cofficients of MLOG.
figure(1)
plot( (1:N), Gaussian_1D_2_Diff_Modified, 'LineWidth',3)
xlabel('Index (n)','FontSize',14,'FontWeight','bold')
ylabel('MLOG Mask Values','FontSize',14,'FontWeight','bold')
title('MLOG MASK','FontSize',14,'FontWeight','bold')
set(gca,'fontsize',12,'FontWeight','bold')
% Plotting Input, Output of MLOG, and Smoothed Output Signal.
figure(2)
subplot(3,1,1),plot(1:length(x),x)
xlabel('Sample Index','FontSize',14,'FontWeight','bold')
ylabel('Count','FontSize',14,'FontWeight','bold')
title('Input Signal','FontSize',14,'FontWeight','bold')
set(gca,'fontsize',12,'FontWeight','bold')
subplot(3,1,2),plot(1:length(Output), Output)
xlabel('Sample Index','FontSize',14,'FontWeight','bold')
ylabel('Count^2','FontSize',14,'FontWeight','bold')
title('Output Signal of IGLF Filter','FontSize',14,'FontWeight','bold')
set(gca,'fontsize',12,'FontWeight','bold')
subplot(3,1,3),plot(1:length(Output_More_Smoothing), Output_More_Smoothing)
xlabel('Sample Index','FontSize',14,'FontWeight','bold')
ylabel('Count^2','FontSize',14,'FontWeight','bold')
title('Smoothed Output Signal','FontSize',14,'FontWeight','bold')
set(gca,'fontsize',12,'FontWeight','bold')知乎学术咨询:
https://www.zhihu.com/consult/people/792359672131756032?isMe=1

图片

图片

  • 擅长领域:现代信号处理,机器学习,深度学习,数字孪生,时间序列分析,设备缺陷检测、设备异常检测、设备智能故障诊断与健康管理PHM等。
http://www.lryc.cn/news/394002.html

相关文章:

  • 计算组的妙用!!页面权限控制
  • Self-Instruct构造Prompt的例子
  • 友好前端vue脚手架
  • SQL Server特性
  • 华为HCIP Datacom H12-821 卷25
  • 如何在 Selenium Python 中解决验证码 | 2024 完整指南
  • ASCII码对照表【2024年汇总】
  • 刷题之买股票的最佳时机(leetcode)
  • Apache Seata透过源码解决SeataAT模式整合Mybatis-Plus失去MP特性的问题
  • 1.2 如何让机器说人话?万字长文回顾自然语言处理(NLP)的前世今生 —— 《带你自学大语言模型》系列
  • 【QT】按钮类控件
  • RedHat运维-Linux软件包管理基础-RHEL9软件包管理基础
  • uniapp----- 判断小程序版本有没有更新
  • Spring Boot的无缝衔接:深入解析与实践
  • 在Linux上查找文件的2个好用的命令
  • 实现WebSocket聊天室功能
  • qt opencv 应用举例
  • QT5.12环境搭建与源码编译
  • Android中android.fg线程和android.ui线程分别代表什么?
  • MATLAB 2024b 更新了些什么?
  • SSM高校教师教学质量评估系统-计算机毕业设计源码03344
  • 【Linux进阶】文件系统5——ext2文件系统(inode)
  • 华为云简介
  • Doris数据库---建表、调整表结构操作
  • 《昇思 25 天学习打卡营第 11 天 | ResNet50 图像分类 》
  • 实现多数相加,但是传的参不固定
  • Windows环境安装Redis和Redis Desktop Manager图文详解教程
  • SQL Server 2022的组成
  • 【大语言模型系列之Transformer】
  • 操作系统-懒汉式单例模式