Extraction of object boundaries from an image
Show older comments
Dear all,

I am working with the above image that contains 20 irregularly shaped objects on a Cartesian grid. Given the (x,y) coordinates of an arbitrary point, is there a way to determine whether or not the point lies within the boundary of one of the objects? Please note that the (x,y) coordinates may not necessarily be an integer multiple of the grid spacing of 0.2 used in the above figure.
I belive it is first necessary to identify the boundaries of each of the 20 objects using the Image Processing Toolbox. I have tried using the bwtraceboundary function for this purpose without any success thus far.
Any help/hints would be greatly appreciated.
2 Comments
Peter O
on 6 Jul 2021
Is the grid spacing present in the image? That could complicate the region detection and segmentation. Without the grid overlay, it should be really straightforward for bwboundaries to find the regions.
Is the grid always at 0.2, or can it be determined a priori (perhaps with an edge detector)? You could play some games with the areas of fill regions and then knit ROIs together.
Karthik Nagarajan
on 6 Jul 2021
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


