MATLAB: How to crop bigger size of blob in binary image and count its pixel .

bounding boxcropImage Processing Toolboximage segmentationMATLABrahulpunk

Best Answer

Not sure what you mean. You can use imcrop() if you want. You can also find the bounding boxes if you want:
props = regionprops(binaryImage, 'BoundingBox');
To crop out each one individually, do this
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
subImage = imcrop(binaryImage, thisBB);
figure;
imshow(subImage);
end
This is done in my Image Processing Tutorial
screenshot.jpg