0

I want to write code (python,opencv) for a line follower robot equipped with a camera and Raspberry Pi. I want to make to robot go has fast as possible

  1. The course has few very sharp turns like this: https://imgur.com/a/h07WlAD/ I'm assuming that using ROI (region of interest) will not work well when the robot in near the turn (it will also capture/"see" the other line) - for example as shown below. What is the best approach here?

https://imgur.com/a/b9K66Rp

  1. In the course there is a junction as shown in below image, enter image description here

    How to "understand" that this is a junction? and if the robot is coming for the bottom of the image, how to make the algorithm continue driving straight and not get confused by the horizontal line?

Krunal V
  • 1,255
  • 10
  • 23
RubZ
  • 13
  • 4
  • 1
    I have a question, what did you do until now? – Felipe Augusto May 05 '19 at 22:46
  • I'm experimenting, I wrote a code that slices the input image from the camera (horizontal). On each slice I run threshold-> findcontours-> find the centeroid of the contour. I keep track on the line using a sliding window, because on the right to of the line (in some places) there are signaling lines and I need to filter them out. When I get close to a sharp turn, the sliding doesn't work well – RubZ May 05 '19 at 23:02
  • 1
    By sharing that code we can help you better, see [here](https://stackoverflow.com/help/how-to-ask) – Felipe Augusto May 06 '19 at 10:50

1 Answers1

0

I can recommend this awesome video on YouTube:

https://www.youtube.com/watch?v=tpwokAPiqfs&t=868s

It contains several episodes and teachs a lot of useful stuff. Good luck!!!

Michael Brown
  • 137
  • 2
  • 13