Isolating objects detected in a binary image
Show older comments
Hello,
I am currently working on my dissertation, in which I am using machine learning to classify different objects in binary images. I have gotten pretty far and am trying to get individual photos for all the objects in the binary image. I am doing this by using a combination of getting the bounding boxes from regionprops and by using imcrop/imwrite. My hope is to get a library of these images which I can use to train a deep learning classification algorithm and see how it compares to supervised machine learning methods. My only issue is smaller objects keep getting caught in the background of cropped images for bigger objects. I've attached images as examples below. My question is how can I isolate each object, so that a cropped image only has the object I want without the 'background' objects.
After having a slight think, I wonder if theres a way to iterate through the library of objects in the image based on it's area, then filtering out the smallest objects first and removing them from the binary image. I believe this might work, but I've no idea how to implement it.
Thanks for your help in advance!
E
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing and Computer Vision 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!

