fill a particular blob with black

조회 수: 1 (최근 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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by