How would I detect gray/white pixels in a picture?

1 vue (au cours des 30 derniers jours)
Ali Almakhmari
Ali Almakhmari le 8 Août 2022
I am trying to write a function to detect white-like and gray-like pixels in a given colored picture. I am stuck on how to go about it. Any help is appreciated.
  1 commentaire
yanqi liu
yanqi liu le 9 Août 2022
yes,sir,may be upload your image file to analysis

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 9 Août 2022
Convert for HSV, check for "high" V (near 1) and "small" (near 0) S. You will need to decide on the exact boundaries, depending how "white like" or "gray like" you want to allow.

Plus de réponses (1)

KSSV
KSSV le 8 Août 2022
REad about find. Gve the pixle value as zero and use find. This will give you the indices.
[y,x] = find(I==0) ; % I is gray image
  1 commentaire
Ali Almakhmari
Ali Almakhmari le 8 Août 2022
But that would require me to manually identifiy the gray pixels and assign them to zero. Which is the thing I am trying to automate with this function.

Connectez-vous pour commenter.

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by