fill a particular blob with black
1 view (last 30 days)
Show older comments
Elysi Cochin on 27 Jan 2017
Answered: Takuji Fukumoto on 27 Jan 2017
i segment and get a binary image with "n" number of blobs, Suppose i want to fill a particular blob with black and save it as image 2... how to do it...
for k = 4 : 4
thisBlobsBoundingBox = blobMeasurements(k).BoundingBox;
bw = labeledImage == k;
what should i do to the bw... please reply
Takuji Fukumoto on 27 Jan 2017
Please try this.
L = bwlabel(BW);
[r,c] = find(L == 4);
BW(r,c) = 0;
More Answers (0)
Find more on Image Segmentation and Analysis 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!