MATLAB: How to calculate the area or percentage for each cluster

classificationcolorcolormapimage processingImage Processing Toolboximage segmentation

hi all i have this image , i need to know the percentage for each color compared withe whole image , each color present one cluster how i can finde it for example red color = 30% green color = 20% yellow color= 10% blue color = 40%
thanks

Best Answer

Simply take the histogram of your indexed or labeled image ( not the pseudocolored RGB image of course). Use histogram().
Related Question