Identify a blob inside another blob in separate images
4 views (last 30 days)
Show older comments
Hi. I´ve got 2 different binary images, BwImg1 and BwImg2. With bwlabel, bwboundaries and regionprops, I get their regions or blobs. What I mean is to discover the blobs in, for instance, BwIm1 that surround any blob in BwImg2 if both images were overlaid. To clarify, think that we overlay BwIm1 and BwIm2 and in such a case, blob_B in BwIm2 would be inside blob_A in BwIm1. Is there any relatively direct way to get this? Thanks a lot in advance. Regards.
0 Comments
Answers (1)
Image Analyst
on 18 Jan 2014
This is called "morphological reconstruction" and is done by imreconstruct(). The smaller/inside blob is the " marker" image, and the larger/surrounding/outside blob image is the main binary image.
3 Comments
Image Analyst
on 20 Jan 2014
Edited: Image Analyst
on 20 Jan 2014
Please post an image. I don't know if you're talking about a donut in one image and a spot in the hole in the other image (like a bullseye target) or if the bigger blob completely overlaps the smaller one in the other image. Posting the two images would clear that up. I'm not sure if you just want to AND the images to find overlap, or if you want to use imreconstruct() or if you need to use bwboundaries() to get the nesting relationship.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!