how to recognize three different colors and when one is recognised to do an action

5 Ansichten (letzte 30 Tage)
hello everyone this is my first question and i am new to this "forum" so don't be mad if this question was asked earlier.
Is it possible to recognize 3 different colors (red,green,yellow) I am doing an project "traffic lights" and i need to write a program in matlab which recognizes 3 different colors red green and yellow and when the recognized color is green i would do action number 1 ,if it is yellow i would do action number 2 ....
It should be like this: a robot is moving and when seeing an object he turns web-cam on and now i have to determinate which color i see if it is r/g/y.
So my question is if i identify a color lets say it is green How can i say do action number 1.How to fuse the results of an image with code.
like switch: case1:green case2:yellow case3:red..
any ideas how this can be done
thank you very much for every help

Akzeptierte Antwort

Image Analyst
Image Analyst am 21 Nov. 2011
See my color segmentation demos for several ways to do color detection and location: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by