how to calculate the area of certain portion of an image ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
how to calculate the area of certain portion of an image ?
0 commentaires
Réponse acceptée
Image Analyst
le 2 Jan 2014
Modifié(e) : Image Analyst
le 2 Jan 2014
Call regionprops(). See my Image Segmentation Tutorial. It goes over all of that:
For example with a simple thresholding:
binaryImage = grayImage > 90;
measurements = regionprops(binaryImage, 'Area');
allAreas = [measurements.Area];
2 commentaires
Image Analyst
le 4 Jan 2014
Then just get it. For example to get the area of blob #42, do this
blob42area = allAreas(42);
blob42area = measurements(42).Area; % Same thing as above.
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!