bwlabel doesn't find a blob
Show older comments
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?
Thanks


Answers (1)
KALYAN ACHARJYA
on 22 Jan 2020
Edited: KALYAN ACHARJYA
on 22 Jan 2020
0 votes
5 Comments
parinaz nazeri
on 22 Jan 2020
KALYAN ACHARJYA
on 22 Jan 2020
Edited: Image Analyst
on 23 Jan 2020
Where is the 6th blob? See the morphological operation (maybe helps) before get the blobs' properties.
Have to apply the following:
[L, numberOfBlobs] = bwlabel(binaryimage,4) % see the total blobs results
parinaz nazeri
on 23 Jan 2020
Image Analyst
on 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
on 24 Jan 2020
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!