Question related to Image analysis Functions: bwconncomp and regionprops
조회 수: 3 (최근 30일)
이전 댓글 표시
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
Jeff E
2013년 7월 26일
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.
채택된 답변
Image Analyst
2013년 7월 26일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!