fill a particular blob with black

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2017 年 1 月 27 日
回答済み: Takuji Fukumoto 2017 年 1 月 27 日
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

採用された回答

Takuji Fukumoto
Takuji Fukumoto 2017 年 1 月 27 日
Please try this.
L = bwlabel(BW);
[r,c] = find(L == 4);
BW(r,c) = 0;
figure,imshow(BW)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by