On using 'regionprops'?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Deepak Sivadas
le 21 Nov 2018
Réponse apportée : Image Analyst
le 21 Nov 2018
Hi,
Stats = regionprops(L,'all');
for instance, L is a labelled binary image of 256x256.
What determines the size of Stats ? Pls respond.
Thanks,
Deepak
0 commentaires
Réponse acceptée
Image Analyst
le 21 Nov 2018
The length of the stats structure is the same as the number of blobs in your image.
[L, numberOfBlobs] = bwlabel(binaryImage);
stats = regionprops(L, 'All');
fprintf('There are %d blobs in the labeled image.\n', numberOfBlobs);
fprintf('There are structures, in the stats structure array.\n', length(stats));
You can see that length(stats) will be the same as numberOfBlobs.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!