how to combine ratios of all color channels of RGB to detect road signs

6 views (last 30 days)
hello, using RGB color detection, I can detect red, blue and yellow sign separately. for instance to detect red road signs, I should find the ratio of red and green.
Red color road sign: red channel/green channel Blue color road sign: blue /green channel however, this algorithm only works separately. How can I combine all of three ratios so that it can detect blue ,yellow and blue road signs respectively.

Accepted Answer

Image Analyst
Image Analyst on 15 Oct 2012
Just OR the binary images that you got from detecting each color separately:
allSigns = redSigns | blueSigns | yellowSigns;
  3 Comments
Image Analyst
Image Analyst on 15 Oct 2012
You said "I can detect red, blue and yellow sign separately" so I believed you. I believed that you have some algorithm that does that and produces a binary image which is like a map of where in the image pixels of those colors lie. One image for where the red pixels lie, one for the blue pixels, and one for the yellow pixels. To get a map of where any of them lie, regardless of the color, OR them together.
Tulips
Tulips on 15 Oct 2012
Yes it has been detected but in separately coding. how I should OR them together .should I combine all or the ratios to detect red, blue and yellow respectively?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!