Effacer les filtres
Effacer les filtres

how to know the number of regions of the image?

5 vues (au cours des 30 derniers jours)
As Bdg
As Bdg le 17 Juil 2017
Commenté : As Bdg le 31 Juil 2017
Hi! I have a color segmented image. i need to know the number of regions of the image , and the size of each region. Can anyone help me please?
  1 commentaire
Ahmad Moniri
Ahmad Moniri le 17 Juil 2017
Can you give an example image?

Connectez-vous pour commenter.

Réponses (2)

Guillaume
Guillaume le 17 Juil 2017
Modifié(e) : Guillaume le 17 Juil 2017
You use regionprops on your segmented image. The number of elements in the structure array it returns is the number of regions. The Area field or the BoundingBox field of the structure gives you the size, depending on what you call size.
  3 commentaires
Guillaume
Guillaume le 17 Juil 2017
Modifié(e) : Guillaume le 17 Juil 2017
I'm not sure what an inverse wavelet transform of a labeled image gives you. If it's still a label image then you can use regionprops on it. If it's not, then you need to segment it again using an appropriate method, possibly another watershed.
I don't really understand why you'd want to apply an inverse wavelet transform to the result of a watershed segmentation.
As Bdg
As Bdg le 26 Juil 2017
I'm using multiresolution approach for image segmentation. i constructed the pyramid using the wavelet transform , i segmented the image using watershed at a lower resolution, but now i need to go back to my original image . that's why i need to apply an inverse wavelet transform . And after applying it i have to merge the regions and refine regions borders, so i need to define the regions after the inverse wavelet transform. If i'll use another watershed, the image will be more over-segmented , however my goal is to avoid this over-segmentation and minimise the number of regions.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 27 Juil 2017
Use bwlabel() on your segmented (binary) image - that's one way.
[~, numRegions] = bwlabel(segmentedImage);
  8 commentaires
As Bdg
As Bdg le 31 Juil 2017
after inverse wavelet transform
As Bdg
As Bdg le 31 Juil 2017

Connectez-vous pour commenter.

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by