loading
 
Ricardo Sampaio
Ricardo Sampaio from Portugal  [32 posts]
16 year
Hi every one, im making a line follow robot as i normally do for RoboCup but whit  roborealm.

My problem is detecting the green and silver figures that it encounters on is path.
I have easy achieve getting the green ones but the silvers... (here using a silver tape for test purpose.

So just by the color or by is bright and not for its aspect is possible to get it?
is almost like a mirror.

thx in advance.


Anonymous 16 year
Ricardo,

We needed to wait for a new modue to be launched to handle this one (i.e. the Sample Color module). Basically one way to do this is to

1. detect the upper and lower part of the line by looking for dark blobs.
2. determine the midpoint between those two line parts, that should approx be where the tape is assuming its the tape that split the line.
3. sample the color in that area and check to see if it is nearest to gray, green, etc.
4. react accordingly.

We attached a sample script that does just that except for #4. Basically you would use the information contained in SAMPLE_COLOR_NEAREST to determine what colored tape you are looking at. Note that even though the gray tape is reflective it is still closer in color to gray as apposed to green. Hopefully this gets you started in the right direction. Also note the use of a double flood fill. This is intentional to gradually bias the colors in the right direction.

Note that it appears to work on your attached images. If you find more that don't please post them here.

STeven.

program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index