当前位置:网站首页>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 :
边栏推荐
- Stack Title: basic calculator
- 网络文件传输之零拷贝
- Linked list related interview questions
- Tutorial on principles and applications of database system (056) -- MySQL query (18): usage of other types of functions
- I just test it
- Mapbox GL JS active map refresh method
- Oracle - isupplier portal Invoicing error
- B - Krypton Factor(dfs+回溯法)
- 谷歌浏览器调试工具使用基础版(一)
- "Yuanqi Cola" is not the end point, "China Cola" is
猜你喜欢

Practice sharing of monorepo based on yarn1.x

Arthas watch command to view the properties of objects in the array

Network layer 2 and layer 3 forwarding

PyCharm在创建py文件时自动添加头部注释

The second China rust developer conference is coming, and the complete agenda has been exposed!

4QAM、16QAM 调制与解调仿真电路,观察并分析QAM星座图和误码率曲线【matlab代码】

Speech comprehension - structural analysis exercise of fragment reading
![[unity] random generation of two-dimensional cave map](/img/ec/7433f6e942fc3d0b03cac37ac87e7b.png)
[unity] random generation of two-dimensional cave map

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

CPU的三种模式
随机推荐
NIO简易示例
服务器可用资源查询脚本
The sales volume has won the championship repeatedly. Is the secret of Wuling's success only low price?
"Weilai Cup" 2022 Niuke summer multi school training camp 2 h.[take the elevator] maintenance section
Y77. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (VIII)
Is it safe to open an account for stock speculation through the online account manager?
聚势|海泰方圆亮相第五届数字中国建设峰会
Cross-lingual Transfer of Correlations between Parts of Speech and Gaze Features 阅读笔记
记一次自定义 Redis 分布式锁导致的故障
Causes of signal degradation in optical fiber communication
Oracle - isupplier portal Invoicing error
3059. 雕塑(jzoj)
Dijkstra find the shortest path
[combinational logic circuit] - encoder
TV software burning
8、学习MySQL 创建数据表
“蔚来杯“2022牛客暑期多校训练营2 个人题解集合
Record a failure caused by a custom redis distributed lock
【数据挖掘】生成模型和判别模型的区别及优缺点
B - Krypton Factor (dfs+ backtracking method)