Effacer les filtres
Effacer les filtres

How to convert an image to its correspending bw by making certain rgb to appear white and rest black.

5 vues (au cours des 30 derniers jours)
I want a code which would convert an image into its corresponding bw image .the code should ask me to select certain rgb values which would appear white in the binary image and would blacken out the rest. for example if I want to convert the above image into bw form the program would ask for rgb values I would like to see as white in binary image (in this case triangles ,circles and squares)and blacken outs the rest. please help me with a method other than setting level as in the exam the colors of the objects would be different and we are no allowed to set levels on the spot.

Réponse acceptée

Image Analyst
Image Analyst le 13 Déc 2015
There is no image attached. But anyway, see my Image Segmentation by Delta E color difference in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. It will do what you ask for. It lets the user trace out a color in the image, then it finds all pixels within a certain color difference of that color and gets a binary image. Then it masks the image so that you see matching color regions and non-matching color regions.
  4 commentaires
Soumya Behera
Soumya Behera le 14 Déc 2015
sir can you direct me to the links you are talking about in your comments
Image Analyst
Image Analyst le 14 Déc 2015
I already gave you the link. Here it is again: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Just pick whichever color segmentation method you want to try. Actually, download and try all of them.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by