How can I detemine the presence of some colors (e.g white, light brown, dark brown, red, blue gray and black) in a piture like attached one?

3 vues (au cours des 30 derniers jours)
I have to count presence of any colour if its number of pixels is more than 5% of total number of pixels.

Réponse acceptée

Image Analyst
Image Analyst le 22 Fév 2020
With 16 millino colors possible in a24 bit RGB image, probably no color has that much. You'd be best off defining a limited number, like 5 or 10, color ranges. Then like Daniel said, use the Color Thresholder App to get the area fraction for each color range that you specify.
  2 commentaires
riya shahrin
riya shahrin le 22 Fév 2020
Modifié(e) : riya shahrin le 22 Fév 2020
I was having problem in selecting threshold value for some colours in color thresholder app as they are not exacty visible and separate from other shades. how can I select threshold value for light brown,derk brown and blue grey?
whenever I give a fixed RGB value for a color (e.g rgb(181,101,29) for light brown),number of pixel of that colour become zero.
Image Analyst
Image Analyst le 22 Fév 2020
Try LDA, where you manually lassoo regions that you define to be whatever color you want. See my attached demo.

Connectez-vous pour commenter.

Plus de réponses (1)

Daniel Vieira
Daniel Vieira le 21 Fév 2020
the easiest way would be using the Color Thresholder App to create function for the each color you want.

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by