fill a particular blob with black
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Elysi Cochin
le 27 Jan 2017
Réponse apportée : Takuji Fukumoto
le 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;
end
what should i do to the bw... please reply
0 commentaires
Réponse acceptée
Takuji Fukumoto
le 27 Jan 2017
Please try this.
L = bwlabel(BW);
[r,c] = find(L == 4);
BW(r,c) = 0;
figure,imshow(BW)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!