필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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

채택된 답변

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by