Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
I have a segmented image.. Now i need to find the smallest area from the image using the pixels values. How to do this in Matlab? Thank you in advanced...
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
From the above image i need the regions marked with red circles. The marked regions hold the lowest number of pixels in the image. Please suggest some techniques.
0 commentaires
Réponses (2)
Constantino Carlos Reyes-Aldasoro
le 3 Oct 2019
Hello
If the areas are defined by the pixel values then you can discard all other pixels by comparing against the value of interest. It looks like you have 4 values and the one you want is the second darkest after the background. Say your image is contained in a variable called brain, then your regions of interest can be extracted like this
brain2 = (brain==2);
that will keep only the two regions of interest. Then you need to distinguish them, to do that use bwlabel
brain3 = bwlabel(brain2);
bran4 = regionprops(brain3,'area');
And that will identify your regions and their propoerties
1 commentaire
Constantino Carlos Reyes-Aldasoro
le 3 Oct 2019
to find the values of your pixels, add the colorbar to your figure and you can find out. Alternatively you can use this
unique(brain)
and will give you the unique values of your image.
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!