How to extract a particular blob from an image consisting of number of blobs. In the figure below, i need to separately show the first ellipse in an image window.
3 views (last 30 days)
Show older comments
I know the image i have attached contains 13 blobs and i need to show image of (say 4th blob) alone in a separate image window. How is it possible to do so. Please explain with a script.
0 Comments
Accepted Answer
Image Analyst
on 30 Jul 2016
You could try bwselect() if you know the location. Otherwise you can label and use ismember
% Assign each blob an ID label.
labeledImage = bwlabel(binaryImage);
% Extract the 4th blob into it's own binary image.
binaryImage4 = ismember(labeledImage, 4) > 0;
3 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!