how to crop bigger size of blob in binary image and count its pixel .

 Accepted 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

3 Comments

thanks for giving response but ,i have only crop bigger blob in the above image and count its pixel...
Use bwareafilt()
biggestBlob = bwareafilt(binaryImage, 1); % Extract largest blob ONLY
areaOfBiggestBlob = nnz(biggestBlob) % Get its area
its very easy thanks image analysis

Sign in to comment.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Products

Release

R2011b

Community Treasure Hunt

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

Start Hunting!