How to detect RGB under popup menu?

1 visualizzazione (ultimi 30 giorni)
mete polat
mete polat il 24 Dic 2015
Commentato: mete polat il 25 Dic 2015
i have popup menu includes red , green and blue. When i select one of the colours, i want that choosen color will detect from a pic and will display on axes2. For example, there are 4 different shape and each one is different color. When i choose red under popupmenu, i want that which share includes red color will display on axes2. can someone help me pls?

Risposta accettata

Image Analyst
Image Analyst il 24 Dic 2015
selectedItem = get(handles.popupMenu, 'Value')
if selectedItem == 1;
% Display the red shape
elseif selectedItem == 2
% Display the green shape
elseif selectedItem == 3
% Display the blue shape
end
Display the shapes with whatever function you're using, for example patch() or fill(). If you're trying to do color segmentation from an RGB image, then see my color segmentation demos for ways to extract pixels of just certain colors from the image. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
  1 Commento
mete polat
mete polat il 25 Dic 2015
actually, this is my answer but i couldn't arrange my program. i add my code, maybe you can help me a little more. Anyway thank you.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by