extract only white pixels from an image
Afficher commentaires plus anciens
How can I extract mean and variance of only white pixels of an image?
Réponses (1)
Image Analyst
le 28 Déc 2019
Modifié(e) : Image Analyst
le 28 Déc 2019
What value do you consider "white"? Let's say it's 230. Then you can get a binary image
binaryImage = grayImage >= 230;
Now, exactly what does "extract" mean to you? You want to consider all the gray values in the binary image? If so do
maskMean = mean(grayImage(binaryImage));
maskSD = std(grayImage(binaryImage));
maskVar = var(grayImage(binaryImage));
1 commentaire
Mary Baratzadeh
le 30 Déc 2019
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!