当前位置:网站首页>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 :
边栏推荐
猜你喜欢
![[go] III. The simplest restful API server](/img/1f/f6fc8cc9a3891d01a25e709170188d.png)
[go] III. The simplest restful API server

NIO简易示例

Linked list related interview questions

Fastjason handles generics

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

Cross-lingual Transfer of Correlations between Parts of Speech and Gaze Features 阅读笔记

EasyRecovery15下载量高的恢复率高的数据恢复软件

MulDA: A Multilingual Data Augmentation Framework for Low-Resource Cross-Lingual NER 阅读笔记

The gym closes 8000 stores a year. How does the studio that bucks the trend and makes profits open?

Redis数据结构详解,结合书本
随机推荐
Kubernetes pod start process
服务器可用资源查询脚本
当博客被黑客攻击时该怎么办?
poj1521
Basic version of Google browser debugging tool (I)
PTGui Pro12垂直线纠正
Mulda: a multilingual data augmentation framework for low resource cross linguistic ner reading notes
What is informatization? What is digitalization? What are the connections and differences between the two?
01. MySQL transaction isolation level and concurrent database access
Fiddler5+ lightning simulator 4.0 settings for app packet capturing
[go] how to control the maximum number of concurrent processes
“蔚来杯“2022牛客暑期多校训练营2 G.[Link with Monotonic Subsequence] 分块构造
Case when of SQL
ABC find 4-cycle (pigeon nest theorem)
Handler message mechanism - FWK layer
Codisvsrediscluster: which cluster scheme should I choose?
Quickly create a topic folder
Tutorial on principles and applications of database system (054) -- MySQL query (16): usage of date time function
Speech comprehension - structural analysis exercise of fragment reading
Stack Title: basic calculator