How to find the area of each of the blobs in the image and create a histogram of the number of blobs in each size range
13 views (last 30 days)
Show older comments
Allen Borrow
on 14 Jun 2022
Answered: Image Analyst
on 14 Jun 2022
Hi! I am trying to find the number of pixels in each of the blobs in the image and create a histogram that shows the number of blobs in each size range ( 0%-10% of the biggest blob size, 10%-20% of biggest blob size ... 90%-100% of the biggest blob size).
I've able to find the total number of pixels in all the blobs altogether but I am having trouble finding the number of blobs present and also the individual numbers of pixels within each blob. Would appreciate any help
Thanks!

0 Comments
Accepted Answer
Image Analyst
on 14 Jun 2022
It does all that. Just change it to use your image instead of the demo image. Key points would be
mask = grayImage < someValue;
props = regionprops(mask, 'Area');
numBlobs = numel(props)
allAreas = [props.Area]
edges = linspace(0, max(allAreas), 11);
histogram(allAreas, edges);
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!