• Welcome to Computer Association of SIUE - Forums.
 

Eyebot and color distinction

Started by Ryan Lintker, 2002-09-18T10:12:50-05:00 (Wednesday)

Previous topic - Next topic

Ryan Lintker

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???
"You can't always get what you want,
 but if you try sometime, you just might find,
you get what you need" - The Rolling Stones

Stiffler

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. 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
Retired webmaster of CAOS.

Geoff Schreiber

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
~~~~~~~~~~~~~~~~~~~
Geoff Schreiber
Project Engineer
FASTechnology Group

Stiffler

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
Retired webmaster of CAOS.

Geoff Schreiber

Any bit is appreciated!
~~~~~~~~~~~~~~~~~~~
Geoff Schreiber
Project Engineer
FASTechnology Group

Ryan Lintker

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.
"You can't always get what you want,
 but if you try sometime, you just might find,
you get what you need" - The Rolling Stones

Geoff Schreiber

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 ...
~~~~~~~~~~~~~~~~~~~
Geoff Schreiber
Project Engineer
FASTechnology Group