Lesson 30: Removing Salt and Pepper Noise using Mean Filter in Matlab

Опубликовано: 23 Ноябрь 2023
на канале: Nuruzzaman Faruqui
135
2

Noise is a common problem for image. And that makes the noise removal is a frequent task in image processing. In this tutorial, we are going to learn, how to remove salt and pepper noise using mean filter in MATLAB. Image processing in MATLAB is easier. Because, here we can use the built-in functions. To remove noise, we will use a built-in function of MATLAB named ‘imfilter()’. This function is used to apply various types of filter to images. In this tutorial, first I loaded an image. Then added salt and pepper noise to the image. After that, I created a 3 x 3 convolutional kernel. I converted the kernel into a mean filter by replacing the values of the matrix by 1/9. Finally using the ‘imfilter()’ function, I applied the mean filter to the image.

The code used in this lesson:

I = imread('sky.jpg');
N=imnoise(I,'salt & pepper', 0.03);
mf = ones(3, 3)/9;
noise_free = imfilter(N,mf);

subplot(2,2,1),imshow(I), title('Original Image');
subplot(2,2,2),imshow(N), title('Noisy Image');
subplot(2,2,3),imshow(noise_free), title('After Removing Noise');


Смотрите видео Lesson 30: Removing Salt and Pepper Noise using Mean Filter in Matlab онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Nuruzzaman Faruqui 23 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 135 раз и оно понравилось 2 людям.