i have image that contain many blobs . my problem is that how to test each blob individually by masking it up on the original image?! i tried this code but i did not know how to complete it
labelledImage = bwconncomp(segmentedimage);
stats = regionprops(labelledImage, 'all');
centroids = cat(1, stats.Centroid);
[row ,col] = size(centroids);
for i = 1 : row
areaMatr(i) = stats(i).Area; % gives area for each blob in your image
% what i have to put here for testing the blob and masking it out over the
% original image? any help?
end