MATLAB Answers

How to clear dots in image

6 views (last 30 days)
Ali Edinç
Ali Edinç on 9 Jun 2020
Commented: Ali Edinç on 10 Jun 2020
ı worked on this image but couldn`t get rid of the that white dots how can ı do that?
  1 Comment
Ali Edinç
Ali Edinç on 9 Jun 2020
im=imread('4.tif');
im2=im2bw(im);
figure, imshow(im2);
im3=bwareaopen(im2,60);
figure, imshow(im3);
image(logical(im3));
image(logical(im2));
colormap(gray(2))
im3=bwareaopen(im2,60);
figure, imshow(im3);
after that ı cant get back to colors ,ı am new to matlab so can you help ?

Sign in to comment.

Answers (1)

Akira Agata
Akira Agata on 10 Jun 2020
How about the following?
[X,map] = imread('4.png');
X2 = medfilt2(X);
imwrite(X2,map,'output.png');
  2 Comments
Ali Edinç
Ali Edinç on 10 Jun 2020
ı try to obtain closest result to original image

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!