# MATLAB: Fill a particular blob with black

image processing

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
L = bwlabel(BW);[r,c] = find(L == 4);BW(r,c) = 0;figure,imshow(BW)