How do I remove the scattered noise from my Image?

18 Ansichten (letzte 30 Tage)
Hello,
I am trying to remove the round white bodies from my image. I think it is salt and pepper noise. But I have tried applying medfilt2 function with 3X3, 4X4 and 8X8 neighbourhood values yet I have not been able to remove these white spot-like circles. Could anyone please help me how to remove this noise?
Thanks in advance!
i.jpg

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 22 Apr. 2019
Bearbeitet: KALYAN ACHARJYA am 22 Apr. 2019
You can do that in multiples ways- Use morphological operations (Documentation here)
im=imread('image3.jpeg');
im2=im2bw(im);
figure, imshow(im2);
im3=bwareaopen(im2,60);
%..................^.. Change this value as per your requirements
figure, imshow(im3);
You can also look here bwareafilt
  6 Kommentare
KALYAN ACHARJYA
KALYAN ACHARJYA am 22 Apr. 2019
- just explain me why the median filter won't work for this type of noise-
Suppose you have gray image
88.png
Pixels: 20, 34 ,40,45, 100,110,120,200,255
Center Pixel replace by median: 100
As from the image, the noises & its adjacent boundary also having similar pixel values. It doenot effect iy you choose the smaller window, like 3x3 (most noises-white small dots are much larger than 3x3 pixels). If you choose the window size more than 3x3 (say 15x15), I expect it will works. But its effects on non noise parts also.
see the following example:
im=imread('image3.jpeg');
figure,imshow(im);
im2=medfilt2(im,[15 15]);
figure,imshow(im2);
99.png
Lets wait for better clarification from @Image Analyst sir
Guru Charan Das Mudigonda
Guru Charan Das Mudigonda am 22 Apr. 2019
Hello,
Thank you for your response. I understand the logic now. I will try the 15X15 neighbourhood. But like you said, I think even the important part of my image that must not be filtered would be blurred with this neighbourhood. Of course, if possible, I would like to know how to use cleaning and removal morphological operations in correct flow to obtain the same result.
Thanks in advance!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by