当前位置:网站首页>【第 02 章 基于形态学的权重自适应图像去噪技术-全套系统MATLAB智能驾驶深度学习】
【第 02 章 基于形态学的权重自适应图像去噪技术-全套系统MATLAB智能驾驶深度学习】
2022-06-22 01:02:00 【海宝7号】
第 02 章 基于形态学的权重自适应图像去噪技术-全套系统–源文件
MATLAB智能驾驶深度学习
在汽车智能技术、汽车新能源技术、汽车电子这个群雄逐鹿的赛道。智能驾驶技术的要求也在不断的提升。
智能车辆教学平台、智能网联教学平台、汽车电子教学设备、在仿真应用开发部分,目前主流的系统有很多,常用的基础部分和算法开发,智能驾驶模块,较好的还是matlab平台。
本文从形态学的权重自适应图像去噪技术展开讨论。
以终为始,先看效果。



通过四种串联方式,展开细化的分享。
对于主函数,有
main.m
clc; clear all; close all;
filename = fullfile(pwd, 'images/im.jpg');
Img = imread(filename);
if ndims(Img) == 3
I = rgb2gray(Img);
else
I = Img;
end
Ig = imnoise(I,'poisson');
s = GetStrelList();
e = ErodeList(Ig, s);
f = GetRateList(Ig, e);
Igo = GetRemoveResult(f, e);
figure;
subplot(1, 2, 1); imshow(I, []); title('原图像');
subplot(1, 2, 2); imshow(Ig, []); title('噪声图像');
figure;
subplot(2, 2, 1); imshow(e.eroded_co12, []); title('串联1处理结果');
subplot(2, 2, 2); imshow(e.eroded_co22, []); title('串联2处理结果');
subplot(2, 2, 3); imshow(e.eroded_co32, []); title('串联3处理结果');
subplot(2, 2, 4); imshow(e.eroded_co42, []); title('串联4处理结果');
figure;
subplot(1, 2, 1); imshow(Ig, []); title('噪声图像');
subplot(1, 2, 2); imshow(Igo, []); title('并联去噪图像');
psnr1 = PSNR(I, e.eroded_co12);
psnr2 = PSNR(I, e.eroded_co22);
psnr3 = PSNR(I, e.eroded_co32);
psnr4 = PSNR(I, e.eroded_co42);
psnr5 = PSNR(I, Igo);
psnr_list = [psnr1 psnr2 psnr3 psnr4 psnr5];
figure;
plot(1:5, psnr_list, 'r+-');
axis([0 6 18 24]);
set(gca, 'XTick', 0:6, 'XTickLabel', {'', '串联1', '串联2', '串联3', ...
'串联4', '并联', ''});
grid on;
title('PSNR曲线比较');
中间处理过程函数
GetRateList.m
function f = GetRateList(Ig, e)
f.df1 = sum(sum(abs(double(e.eroded_co12)-double(Ig))));
f.df2 = sum(sum(abs(double(e.eroded_co22)-double(Ig))));
f.df3 = sum(sum(abs(double(e.eroded_co32)-double(Ig))));
f.df4 = sum(sum(abs(double(e.eroded_co42)-double(Ig))));
f.df = sum([f.df1 f.df2 f.df3 f.df4]);
GetStrelList.m
function s = GetStrelList()
s.co11 = strel('line',5,-45);
s.co12 = strel('line',7,-45);
s.co21 = strel('line',5,45);
s.co22 = strel('line',7,45);
s.co31 = strel('line',3,90);
s.co32 = strel('line',5,90);
s.co41 = strel('line',3,0);
s.co42 = strel('line',5,0);
matlab函数浏览器–查找
函数–imerode调参函数帮助文档
ErodeList.m
function e = ErodeList(Ig, s)
e.eroded_co11 = imerode(Ig,s.co11);
e.eroded_co12 = imerode(e.eroded_co11,s.co12);
e.eroded_co21 = imerode(Ig,s.co21);
e.eroded_co22 = imerode(e.eroded_co21,s.co22);
e.eroded_co31 = imerode(Ig,s.co31);
e.eroded_co32 = imerode(e.eroded_co31,s.co32);
e.eroded_co41 = imerode(Ig,s.co41);
e.eroded_co42 = imerode(e.eroded_co41,s.co42);
案例应用对比:
PSNR曲线函数
PSNR.m
function S = PSNR(s,t)
[m, n, ~]=size(s);
s = im2uint8(mat2gray(s));
t = im2uint8(mat2gray(t));
s = double(s);
t = double(t);
sd = 0;
mi = m*n*max(max(s.^2));
for u = 1:m
for v = 1:n
sd = sd+(s(u,v)-t(u,v))^2;
end
end
if sd == 0
sd = 1;
end
S = mi/sd;
S = 10*log10(S);
运行主流程文件
main.m
全套源码下载–>传送门
边栏推荐
- google多用户防止关联工具
- 3 minutes, take you to play with chat robot automation [top template]
- Evc4 program cannot run on the emulator
- 对标Copilot,国内首个:自然语言一键生成方法级代码aiXcoder XL来了
- Divide the list into boxes and draw a histogram through pyechart
- 1876. substring with three different characters
- [bit operation] leetcode1009 Complement of Base 10 Integer
- 带你区分几种并行
- 机器学习 Pytorch实现案例 LSTM案例(航班人数预测)
- pm2 的学习
猜你喜欢

Counter完之后,想统计字符串长度大于2的结果

Apache ActiveMQ Artemis简介

第 21 章 路面裂缝检测识别系统设计--matlab深度学习实战

Pyechart drawing word cloud

一条短视频成本几十万元,虚拟数字人凭“实力”出圈

内网学习笔记(3)

Apache Doris实时数据分析保姆级使用教程

打造跨境电商成功范式:亚马逊云科技助力卖家布局下一个增长点

【第 20 章 基于帧间差法进行视频目标检测--MATLAB软件深度学习应用】

Creating a successful paradigm for cross-border e-commerce: Amazon cloud technology helps sellers lay out the next growth point
随机推荐
High score schemes have been opened to the public, and the second round of the China "software Cup" remote sensing competition is coming!
Standing at the digital tuyere, how can tooling enterprises "fly"
【ÑÖÏ模拟赛】花萎(矩阵加速,循环卷积,高斯消元)
1876. 长度为三且各字符不同的子字符串
[number theory] leetcode1010 Pairs of Songs With Total Durations Divisible by 60
【TensorRT】Video Swin-Transformer部署相关
Use of listctl virtual mode under wince
Counter完之后,想统计字符串长度大于2的结果
PM2 learning
pytorch中copy_()、detach()、data()和clone()操作区别小结
机器学习 Pytorch实现案例 LSTM案例(航班人数预测)
第 19 章 基于语音识别的信号灯图像模拟控制技术
Interview question catalog collection
【NOI模拟赛】区间距离(分块,卷积)
Apache ActiveMQ Artemis简介
打造跨境电商成功范式:亚马逊云科技助力卖家布局下一个增长点
亚马逊测评浏览器,亚马逊测评风控核心知识点
Scuba China trip - Suzhou station, online and offline limited time registration channel has been opened!
The 8th "Internet +" competition - Bi ran, an outstanding architect of Baidu, interprets the proposition of industrial circuit
twenty-one