Question related to Image analysis Functions: bwconncomp and regionprops

3 visualizaciones (últimos 30 días)
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 comentario
Jeff E
Jeff E el 26 de Jul. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 26 de Jul. de 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).

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by