当前位置:网站首页>Digital image processing learning (II): Gaussian low pass filter
Digital image processing learning (II): Gaussian low pass filter
2022-06-26 08:32:00 【Yu Getou】
Introduce
- The formula :
- x,y It's the coordinates of the pixels
- σ Is the standard deviation of normal distribution ,σ The size of will affect the final processing effect ,σ The bigger it is , The more obvious the effect of noise processing , But the more blurred the image , It is better to compare and select this value in practical application .

- Treatment process : Similar to median filter and average filter , Gauss low-pass filtering also defines a fixed size window first ( Also known as Gaussian filter template ), Then calculate the value of each point of the template through the above formula , And then through iteration , Process each pixel of the image .
attach : The high frequency part of an image is usually edge information , Therefore, low-pass filters generally blur the image .
Code implementation
Function function
% Gaussian low pass filter
% img Pass in the image
% N_size Defined template size , Odd value required
% sigma Standard deviation
function H = GaussianLowpass(img, N_size, sigma)
% Define the image length and width
N_row = N_size;
N_col = N_size;
% Gaussian filter template
G_ry = zeros(N_row, N_col);
% Find the center point of the image
center = (N_size + 1) / 2;
% Solution template
for i=1 : N_row
for j=1 : N_col
distance_s = double((i-center-1)^2 + (j-center-1)^2);
G_ry(i,j)=exp((-1) * distance_s/(2*sigma^2))/(2*pi*(sigma^2));
end
end
% Image filtering
H = imfilter(img,G_ry);
end
The main function
% Load Images
img = imread("photo.jpeg");
% Image binarization
img = rgb2gray(img);
% Gauss filtering
G_img = GaussianLowpass(img, 15, 1.2);
% Draw pictures before and after processing
figure;
imshow(img);
title(" Original picture ");
figure;
imshow(G_img);
title(" Gauss filter effect picture ");
Effect display

边栏推荐
- loading view时,后面所有东西屏蔽
- MySQL insert Chinese error
- Reflection example of ads2020 simulation signal
- Cause analysis of serial communication overshoot and method of termination
- Mapping '/var/mobile/Library/Caches/com. apple. keyboards/images/tmp. gcyBAl37' failed: 'Invalid argume
- Teach you a few tricks: 30 "overbearing" warm words to coax girls, don't look regret!
- What is Qi certification Qi certification process
- GHUnit: Unit Testing Objective-C for the iPhone
- Ora-12514: tns: the listener currently does not recognize the service requested in the connection descriptor
- optee中支持的时间函数
猜你喜欢

Necessary protection ring for weak current detection

leetcode2022年度刷题分类型总结(十二)并查集

opencv学习笔记二

Fabrication of modulation and demodulation circuit

(vs2019 MFC connects to MySQL) make a simple login interface (detailed)

Embedded Software Engineer (6-15k) written examination interview experience sharing (fresh graduates)

MySQL practice: 3 Table operation

What are the conditions for Mitsubishi PLC to realize Ethernet wireless communication?

Text to SQL model ----irnet

(1) Turn on the LED
随机推荐
Solve the problem that pychar's terminal cannot enter the venv environment
Tokenizer description in Bert
Design based on STM32 works: multi-functional atmosphere lamp, wireless control ws2812 of mobile app, MCU wireless upgrade program
See which processes occupy specific ports and shut down
批量执行SQL文件
SOC wireless charging scheme
(vs2019 MFC connects to MySQL) make a simple login interface (detailed)
(1) Turn on the LED
And are two numbers of S
Win10 mysql-8.0.23-winx64 solution for forgetting MySQL password (detailed steps)
Relationship extraction --r-bert
OpenCV Learning notes iii
What are the conditions for Mitsubishi PLC to realize Ethernet wireless communication?
First character that appears only once
Installation of jupyter
SOC的多核启动流程详解
optee中的timer代码导读
在 KubeSphere 部署 Wiki 系统 wiki.js 并启用中文全文检索
I Summary Preface
Recognize the interruption of 80s51