当前位置:网站首页>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 :
边栏推荐
- Tutorial on the principle and application of database system (057) -- MySQL exercises
- API测试简介
- 言语理解中心理解总结
- “蔚来杯“2022牛客暑期多校训练营2 I.[let fat tension] 矩阵乘法 J.[Link with Arithmetic Progression]线性回归
- SOC first project hello_ world
- Zombie‘s Treasure Chest(枚举)
- NIO简易示例
- TV software burning
- The gym closes 8000 stores a year. How does the studio that bucks the trend and makes profits open?
- Y77. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (VIII)
猜你喜欢

Recommend a super good UI automation tool: uiautomator2!

Handler message mechanism - FWK layer

Machine learning: Bayesian Networks

iNFTnews | 假如这是元宇宙20年后的样子

What is informatization? What is digitalization? What are the connections and differences between the two?

Modify CSV

Two stage submission and three stage submission

Leetcode 537. complex multiplication (netizens' thoughts, ashamed)

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

C language enumeration types and unions
随机推荐
谷歌浏览器调试工具使用基础版(一)
Leetcode 537. complex multiplication (netizens' thoughts, ashamed)
Oracle - isupplier portal Invoicing error
"Wei Lai Cup" 2022 Niuke summer multi school training camp 2 d.[link with game glitch] two point answer +spfa ring
Dot screen precautions
NodeJS 基于 Dapr 构建云原生微服务应用,从 0 到 1 快速上手指南
网络文件传输之零拷贝
"Wei Lai Cup" 2022 Niuke summer multi school training camp 2 personal problem sets
“蔚来杯“2022牛客暑期多校训练营2 K.[Link with Bracket Sequence I] 括号序列 DP
[Go]三、最简单的RestFul API服务器
poj1521
服务器可用资源查询脚本
Iftnews | suppose this is what the metauniverse looks like 20 years later
Prime Ring Problem
Google gson usage details
[combinational logic circuit] - encoder
快速创建题目文件夹
Stack Title: basic calculator
NIO简易示例
The sales volume has won the championship repeatedly. Is the secret of Wuling's success only low price?