当前位置:网站首页>Image batch processing Gaussian filter noise reduction + peak signal-to-noise ratio calculation
Image batch processing Gaussian filter noise reduction + peak signal-to-noise ratio calculation
2022-07-26 01:37:00 【Bright moon drunk windowsill】
Batch images are filtered for Gaussian noise of different sizes
1. brief introduction
Denoising method : For known image and noise intensity ( The standard deviations are respectively 10,20,30,40,50,75,100), According to different intensity of Gaussian noise, adaptive Gaussian filter is used to denoise the original image , For the noise with small standard deviation, choose low-intensity Gaussian filter , When the standard deviation is large, the filter core with higher intensity is used for noise reduction , The designed filter uses Gaussian filter kernel to convolute with the original image to achieve the purpose of noise reduction .
2. Realization
use Matlab Language for algorithm implementation , And save the filtering results to the original folder , The SNR parameter is incorporated into the image name for reference , The algorithm is implemented as follows :
name={
'Lena','Monarch','House'};
D={
'10','20','30','40','50','75','100'};
for i=1:length(name)
for j=1:length(D)
[name{
i},D{
j}]
path=['testimages\\',[name{
i},D{
j}],'.png'];
img=imread(path);
sigma=str2num(D{
j});
W = fspecial('gaussian',[sigma,sigma],1);
result = imfilter(img, W,'conv');
psnr=getPSNR(img,result);
imwrite(result,['testimages\\',[name{
i},D{
j}],'-psnr-',num2str(psnr),'.png']);
end
end
function [psnr]=getPSNR(src,dst)
diff=src-dst;
MSE= sum(diff(:).*diff(:))/prod(size(src));
psnr = 10*log10(255^2/MSE);
end
3. effect :


solve PSNR The formula , The noise reduction effect evaluation of the designed filter is shown in the table below :
边栏推荐
- Format JS code and debug JS code
- 旅行 (拆点分层)
- Qtreewidget dotted line setting
- "Weilai Cup" 2022 Niuke summer multi school training camp 2 g.[link with monotonic subsequence] block structure
- Travel (split points and layers)
- [ickim 2022] the Fourth International Conference on knowledge and information management
- 《分布式微服务电商》专题(一)-项目简介
- 01. MySQL transaction isolation level and concurrent database access
- The SQL script generated by powerdispatcher model runs incorrectly
- Server available resources query script
猜你喜欢

Redis数据结构详解,结合书本

Linked list related interview questions

Zero copy of network file transfer

当博客被黑客攻击时该怎么办?

Special topic of distributed micro service e-commerce (I) - Project Introduction

FreeBSD bnxt以太网驱动源码阅读记录二:

C语言中的整型数据类型(你真的了解吗)

API测试简介

Big view +500 cases, software teams should improve R & D efficiency in this way
![[go] III. The simplest restful API server](/img/1f/f6fc8cc9a3891d01a25e709170188d.png)
[go] III. The simplest restful API server
随机推荐
谷歌浏览器调试工具使用基础版(一)
In spark SQL, date is used to display the day of the week according to the year, month and day_ format(date,‘u‘)
Advanced C language (I) dynamic memory allocation
Jushi | Haitai Fangyuan appears at the 5th Digital China Construction Summit
当博客被黑客攻击时该怎么办?
Zero copy of network file transfer
“蔚来杯“2022牛客暑期多校训练营2 G.[Link with Monotonic Subsequence] 分块构造
Network layer 2 and layer 3 forwarding
Recommend a super good UI automation tool: uiautomator2!
Special topic of distributed micro service e-commerce (I) - Project Introduction
Oracle is nested at multiple levels, and the alias problem of the table cannot be found
y77.第四章 Prometheus大厂监控体系及实战 -- prometheus的服务发现机制(八)
网络文件传输之零拷贝
8、学习MySQL 创建数据表
Prime Ring Problem
8. Learn Mysql to create data tables
Pycharm automatically adds header comments when creating py files
Dijkstra 求最短路
学习笔记:原码, 反码, 补码
poj1521