% a logical image with holes
mask = imread('blobs.png');
imshow(mask,'border','tight')
% select a particular hole and get a mask for it
holemask = bwselect(~mask,50,180);
imshow(holemask,'border','tight')
% combine the masks
outmask = mask | holemask;
imshow(outmask,'border','tight')