# calculate the area of the black colored objectes in a image

55 vues (au cours des 30 derniers jours)
Mathew le 17 Mai 2024 à 15:33
Réponse apportée : Image Analyst le 17 Mai 2024 à 20:12
hi, sorry to bother you but it seems i have an issue over here but before i start talkin about that issue i have to say that i dont use matlab that often this is why i am still unable to solve this issue and i hope u can help me to solve it. so the problem that i am having is i got this image whit only black and white colors aka "binary image" from my desktop and i am trying to calculate the area of black colored objects and i also wanna calculate the area of the whole image,i tried solving this problem by seeing some community posts but its seems i am unable to solve it and this is why i requested your help
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponses (2)

Walter Roberson le 17 Mai 2024 à 15:52
stats = regionprops(YOUR_BW_IMAGE, 'Area');
areas = [stats.area];
total_area = sum(areas);
##### 4 commentairesAfficher 2 commentaires plus anciensMasquer 2 commentaires plus anciens
Mathew le 17 Mai 2024 à 18:16
Walter Roberson le 17 Mai 2024 à 19:32
Modifié(e) : Walter Roberson le 17 Mai 2024 à 19:32
stats = regionprops(~IUKM, 'Area');
areas = [stats.Area];
total_area = sum(areas);

Connectez-vous pour commenter.

Image Analyst le 17 Mai 2024 à 20:12
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Color Segmentation dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by