need code for Image processing for noise removal

2 views (last 30 days)
I need to remove the keep the spot in the middle and remove the bright element on the right and the other gray element on the left. Please help me. I used erosion and other filtering, couldn't come up correctly. Image size is 640x512 pixel
  2 Comments
Samia Ahmed
Samia Ahmed on 22 Apr 2018
Edited: Walter Roberson on 22 Apr 2018

here is the code. Please help me

I = imread ('image 6.jpg');
I2 = rgb2gray(I);
se1 = strel([0 1 1 0;  1 1 1 1;1 1 1 1; 0 1 1 0]);
se2 = ones(4,4)/16;
se3 = strel('disk', 10);
e = imerode(I2,se1);
fo = imopen(e, se3);
favg = filter2(fspecial('average',4),fo)/255;
fim = imfilter(favg, se2);
% fi2 = imfilter(e, se2);
% fi3 = imfilter(fi2, se2);
% fi4 = imfilter(fi3, se2);
% fi5 = medfilt2(fi4);
subplot (2, 2, 1); 
imshow (I); 
title ('Input'); 
subplot (2, 2, 2); 
imshow (e); 
title ('Erosion');
subplot (2, 2, 3); 
imshow (favg);
title ('Thresholding'); 
subplot (2, 2, 4); 
imshow (fim);
title ('Median Filter');

Sign in to comment.

Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!