LineFollowing with SRV-1b
Simha from United States  [2 posts]
13 years

I am new to both robotic and vision But i am involved in a project where i am using srv-1b for line following and i need your help on below queries:

1.  Is it possible to work with selected area of the original video i..e., in the image2.jpg i have drawn the rectangle(green) and i wish to do further video processing only in the selected region.

2. i have looked at examples but i am finding it difficult to get them work. so in this regard i wish to know if you can suggest some other methods.

3. My novel idea  is as follows :
    a. slice the video in rectangle from rest of image.
    b. place to imaginary points(red points as shown in image2.jpg )
       on the boarder of selected region and then accordingly calculate
       the distance (in terms of points)  b/w imaginary point and the point on
       edge of the line tape(to be followed) and use that distance as input to
       control robot left and right motor accordingly.  please provide your
       opinion  on this approach.

Appreciate your help .


Anonymous from United Kingdom  [99 posts] 13 years
1.  To work with just a section of the image, You can crop the image using Transform -> Crop. This requires almost no processing overhead.

However, I doubt this will achieve the result that you want.  Typically you try to extract the line from background.  This is most often done with some sort of edge detection.  Once you have the edge extracted you use Analysis -> Center of Gravity to find the distance from the center of the line to your bot.  Based on this distance you pass the appropriate values to your bots motors.  Take a look at the line following tutorial.  The techniques it presents will get you started, but there are many optimizations that you can try.

have fun!
Anonymous from United Kingdom  [99 posts] 13 years
I made a quick example of a line follower using just CROP and CANNY. It helps to have a line that is clearly different from the background.  Also, lighting is critical.  


If you are still having trouble, try normalizing the image to try to improve differences in lighting.  I also find that a Polaroid filter over the camera lens helps to cut down reflections substantially.
Simha from United States  [2 posts] 13 years
Hi admin,

Thanks a ton for quick suggestions. the whole idea of line following with CoG is clear to me.  But i still have below questions.
1. In my scenario the COG point is not occurring on the track line.  any  
    suggestion on how to solve this.
2. I found that srv-1b was stalling at some places  any suggestions on this.

Thanks once again.

Anonymous from United Kingdom  [99 posts] 13 years
Your image looks good.  

In the COG box, check the connect COG to center of screen.  (This won't make any difference in the image processing.

At the beginning of your image pipeline try a Histogram -> Normalize to increase the difference between your line and the background.

Try using Edges -> Connect points to fill in any gaps.  Also try Morphology-> Dilate to give  the lines more weight.

Post more images.

have fun

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