Computer Association of SIUE - Forums

CAOS Supported Groups => Robotics => Topic started by: Ryan Lintker on 2002-09-18T10:12:50-05:00 (Wednesday)

Title: Eyebot and color distinction
Post by: Ryan Lintker on 2002-09-18T10:12:50-05:00 (Wednesday)
Has anyone been successful in getting the eyebot to distinguish between all 3 colors and the wall?

Telling the difference between red, green, and the wall seems to be straightforward enough using a ratio of the R and G values.  However, yellow's ratio is very close to the wall's value meaning that another method must be found to distinguish between those two colors.

One suggestion that I have received is to add a secondary check when yellow or black is found and keep checking as the robot nears the color.

More ideas???
Title: Re:
Post by: Stiffler on 2002-09-18T11:06:44-05:00 (Wednesday)
I know your troubles. I had the same colors in AI class using the EyeBots. I used a complex equation to convert RGB image to a better quality. I found a PDF you should read. Get it here (http://www.cs.sunysb.edu/~mueller/teaching/cse564/imgProc.pdf). If you don't understand it, I'll write a simplified version of all the equations you should use. Once the image is enhanced, you can get consistant values to compare. You can even compare with a +/- 1 accuracy  :-) It is complicated math, but it's all spelled out. If you had Calc III you should have no problems at all.

Jon
Title: Re:
Post by: Geoff Schreiber on 2002-09-18T14:19:33-05:00 (Wednesday)
Jon, not sure if Ryan understood the pdf, but I sure didn't... I can see what it's aiming for, but it's not very definitive on where to begin...  Would you mind sharing / explaining some of the details?

Geoff
Title: Re:
Post by: Stiffler on 2002-09-18T14:34:30-05:00 (Wednesday)
Ok, I will. I will write so it doesn't come out and give you the solution for the EyeBot, but it will be so you can impliment it for it.

Jon
Title: Re:
Post by: Geoff Schreiber on 2002-09-18T15:29:26-05:00 (Wednesday)
Any bit is appreciated!
Title: Re:
Post by: Ryan Lintker on 2002-09-19T00:10:04-05:00 (Thursday)
I've had some success with using a pair of ratios instead of just one.  While this makes for many long and ugly if statements, Robbie has not mistaken Mr. Predator for some leafy greenery or the wall for his home.  He still is far from perfect, but mimic an almost blind (and easily stuck) mammal he will.
Title: Re:
Post by: Geoff Schreiber on 2002-09-19T12:42:30-05:00 (Thursday)
Food and predator I've distinguished fine at this point, but the yellow and black are just far to close, that it can find home way too easily...  Hopefully what Jon suggests will help with that ...