What's the most efficient way to isolate a connected region in a binary image given a point contained within that region?
Show older comments
I have a series of binary images with various numbers of 8-connected regions within them. Given a single coordinate lying within one of those regions, what is the most efficient way to generate a binary image that isolates only the connected region containing that point?
For example, given the top image and a single coordinate somewhere in the central region, how can I most efficiently produce the bottom image?
I'm currently doing this using progressive imdilate operations with a 3x3 square SE until I find a stable image. This method seems very inefficient, though, and since I'm doing this kind of operation millions of times within my program, I want to know if I can be doing much better. Any advice from the image processing experts out there?
Thanks,
Andrew

...

Accepted Answer
More Answers (1)
Chad Greene
on 28 Feb 2014
1 vote
Have you looked at the bwboundaries function?
Categories
Find more on Morphological Operations 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!