How to morphologically open a binary image ?

4 vues (au cours des 30 derniers jours)
Gn Gnk
Gn Gnk le 21 Nov 2020
Commenté : Gn Gnk le 24 Nov 2020
Hello , i am trying to morphologically open(to decrease the retrieved area) a binary image . However i am getting a black image (all pixels are 0) .What is wrong ?
se=strel('disk',3);
Im_open=imopen(original_binary,se);
figure;
imshow(Im_open);
  1 commentaire
KALYAN ACHARJYA
KALYAN ACHARJYA le 21 Nov 2020
Please attach original_binary image.

Connectez-vous pour commenter.

Réponses (2)

Image Analyst
Image Analyst le 21 Nov 2020
This works just fine:
grayImage = imread('moon.tif');
subplot(2, 2, 1);
imshow(grayImage);
title('Original Gray Scale Image', 'FontSize', 15);
original_binary = imbinarize(grayImage);
subplot(2, 2, 2);
imshow(original_binary);
title('Binarized Image', 'FontSize', 15);
se=strel('disk',3, 0);
Im_open=imopen(original_binary,se);
subplot(2, 2, 3:4);
imshow(Im_open);
title('Opened Image', 'FontSize', 15);
If it doesn't for you then it's possible all your white blobs in your original image are less than 7 pixels in diameter (3 in radius). Or else your image is so big that the small things just get subsampled away for display (zoom in, in that case to see them).
  6 commentaires
Image Analyst
Image Analyst le 23 Nov 2020
OK, but then what that will do is to remove any blobs smaller than 3 pixels in radius, or 7 pixels in diameter.
Gn Gnk
Gn Gnk le 24 Nov 2020
Got it ! Do you know any other function that i can use to do what i want ?For example check this binary image before and after using imopen() . This is what i want to achieve in the end.

Connectez-vous pour commenter.


asd asd
asd asd le 21 Nov 2020
Good luck with ΨΕΕ file!

Community Treasure Hunt

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

Start Hunting!

Translated by