MATLAB Answers

bwlabel doesn't find a blob

조회 수: 3(최근 30일)
parinaz nazeri
parinaz nazeri 22 Jan 2020
댓글: parinaz nazeri 24 Jan 2020
Hi all,
I have an image which I applied filtering on it and eneded up with the image on the right. I use bwboundaries and bwlabel to obtain the boundaries and blobs in this figure.
I clearly see that boundary #6 can correspond to a blob but bwlabel doesn't find this blob and shows the total number of lobs in this image as 5 instead of 6. Can somebody help please?

  댓글 수: 0

로그인 to comment.


편집: KALYAN ACHARJYA 22 Jan 2020
Yes, total number of blobs in this image is 5 (in context of 8-connected objects)
L=bwlabel(BW) returns the label matrix L that contains labels for the 8-connected objects found in BW.
By default 8 connected (you can choose 4 connected also)

  댓글 수: 5

표시 이전 댓글 수: 2
parinaz nazeri
parinaz nazeri 23 Jan 2020
Thank you I solved my issue by using imfill on the ~image!
Image Analyst
Image Analyst 23 Jan 2020
imfill() would give you a totally white image with just one blob. The blobs are the white things, you know, not the black things. What do you want to label? The white things or the black regions? If you want black, you have to invert your image.
parinaz nazeri
parinaz nazeri 24 Jan 2020
Thanks! Yes, I used the inverted image and it worked fine!

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by