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

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

Matlab 复制代码
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等。
相关推荐
小苏兮1 分钟前
【C++】priority_queue和deque的使用与实现
开发语言·c++·学习
科研服务器mike_leeso9 分钟前
41 年 7 次转型!戴尔从 PC 到 AI 工厂的技术跃迁与组织重构
大数据·人工智能·机器学习
啊森要自信19 分钟前
【GUI自动化测试】Python 自动化测试框架 pytest 全面指南:基础语法、核心特性(参数化 / Fixture)及项目实操
开发语言·python·ui·单元测试·pytest
大千AI助手23 分钟前
机器学习模型评估指标AUC详解:从理论到实践
人工智能·机器学习·模型评估·roc·precision·recall·auc
FL162386312923 分钟前
C++基于opencv实现的暗通道的先验图像去雾
c++·opencv·计算机视觉
赵谨言30 分钟前
基于python智能家居环境质量分析系统的设计与实现
开发语言·经验分享·python·智能家居
2501_9139817831 分钟前
2025年智能家居无线数传设备品牌方案精选
大数据·人工智能·智能家居
不老刘35 分钟前
GitHub Spec-Kit:AI 时代的规范驱动开发工具
人工智能·github·spec-kit
mit6.82438 分钟前
[tile-lang] 张量核心 | 传统MMA->WGMMA | 底层自动选择优化
人工智能·chatgpt
csuzhucong38 分钟前
人类知识体系分类
人工智能·分类·数据挖掘