|
Re: Colour Recognition
Others will fill in the details, here's the "big picture" version:
To follow a line, you look down with 3 sensors (one left, one center, and one right). If the center sensor "sees" the line, you go forward. If the left sensor "sees" the line, you turn left (towards the line). Right sensor, same thing.
OK, now let's say you must follow the RED line and ignore all the others. You make your sensor able to tell the difference, and just do what I wrote above.
Now, instead of 3 sensors, you have a color camera.
The 'follow' part just analyzes the camera image, and if the 'line' is to the left, you turn left (towards the line) until it's centered...then go forward. If it's a RED line, then you just "look" at red.
The color part is actually pretty easy. A color camera gives you four 'channels' of information, red, green, blue and luminance (think 'brightness'). These can be separated and analyzed separately in software.
The 'follow' thing is a tiny bit harder, but basically you identify the "blob" representing the line, and do some math to find the center of the blob. The center will be either left, right or center.... get it?
(By the way, you only have to evaluate the 'blob' along a horizontal line, not the full height of the camera image - that makes it a lot easier, since it is in one dimension and not 2)
I hope this helps you understand the concepts behind what you are trying to do. Of course, you can get really crazy and follow the "thin" line, or the double yellow, or look ahead and anticipate the next turn, or... But let's get the basics down, then you can run wild with the cool-factor stuff.
Don
__________________
I am N2IRZ - What's your callsign?
|