Question related to Image analysis Functions: bwconncomp and regionprops
3 views (last 30 days)
Show older comments
Hi When I pass the output of bwconncomp structure to regionprops function to get information about 'Area' of each region of interest (ROI) for example. Will the length(bwconncomp_output) be equal to length(regionprops_output). So, do the connected components number from bwconncomp be equal to the number of Area values returned by regionprops? I don't understand even why they should be equal or may be unequal. Please explain. PS: I tried working with my image set to check this, no.of connected componenets identified by bwconncomp is not equal to the number of Property values returned by regionprops function. Thank you Harish
1 Comment
Jeff E
on 26 Jul 2013
The documentation does sound like they should have the same length. I routinely feed the results of bwlabel to regionprops, and they always behave in this regard.
I highly recommend posting your binary image somewhere, as well as the relevant code and resulting error message you are receiving.
Accepted Answer
Image Analyst
on 26 Jul 2013
The number of connected components from bwlabel() or bwconncomp() will match the number of structures in the structure array returned by regionprops. Each blob has one structure,and that structure may have as many members as properties you requested. For example if you asked for area and perimeter, of 100 blobs, then you'd have an array of 100 structures, with each structure having 2 members (fields).
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!