remove wanted portions in binary image
Show older comments
i wanted to extract only the white portion from the image
i get more than one region... i should get only one region.... please do reply.....
Accepted Answer
More Answers (1)
Jeremy Wurbs
on 30 Nov 2013
1 vote
If you wish to remove small regions from the binary image itself, you could start by looking at morphological operations ( help bwmorph), specifically erode and dilate.
You could also just remove the small regions from your bounding box list, or just take the largest one. I.e. only take bounding boxes where boundingBox(3)*boundingBox(4) >= minSize.
1 Comment
Elysi Cochin
on 2 Dec 2013
Categories
Find more on Morphological Operations 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!