Effacer les filtres
Effacer les filtres

I need to find the percentage of white region in a segmented image

3 vues (au cours des 30 derniers jours)
Aashir Ahmed
Aashir Ahmed le 8 Juin 2022
I am segmenting an image using multiple segmentation methods. However for some images the segmentation just gives a white region. In order to solve that I need to find the percentage of the white region in that segmented image so that I can discard that segmentation function and use some other function. I am attaching the code below , kindly help me out with this.
The code incudes an objective function which takes an image with its ground truth image. The image is segmented using multiple methods and in the end the best segmentation method is picked. I am attaching the result of this which is just a white segmented image. The objective function needs to discard the image which has 95% of the white region and then use some other method.

Réponses (1)

Image Analyst
Image Analyst le 8 Juin 2022
To find the percentage of "white" in a segmented image you can do
whitePercentage = 100 * nnz(binaryImage) / numel(binaryImage)

Community Treasure Hunt

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

Start Hunting!

Translated by