⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gaussiannoise.m

📁 Image enhancement in frequency domain using Fourier center frequency, Gaussian lowpass filter, Low p
💻 M
字号:
clear all
clc
aa=imread('Fig0427(a)(woman).tif');
f=double(aa);
%input 'salt & pepper', or 'Gaussian'
ab=imnoise(aa,'salt & pepper', 0.2);
a=double(ab);
w=[1 1 1;1 1 1;1 1 1]/9
[row col]=size(a);
for x=2:1:row-1
    for y=2:1:col-1
        a1(x,y)=[w(1)*a(x-1,y-1)+w(2)*a(x-1,y)+w(3)*a(x-1,y+1)+w(4)*a(x,y-1)+w(5)*a(x,y)+w(6)*a(x,y+1)+w(7)*a(x+1,y-1)+w(8)*a(x+1,y)+w(9)*a(x+1,y+1)];
    end
end
figure(1),imshow(uint8(aa)),title('Original Image')
figure(2),imshow(uint8(a)),title('Original Image with salt & pepper')
figure(3),imshow(uint8(a1)),title('Low pass Filter used on Original Image with salt & pepper')
            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -