Robot control using top camera image analysis?

Take a look at this Hough Line Transform — OpenCV 2.4.13.7 documentation
This code should work for you, but you'll have to read a webcam image instead of an image file. Then you'll have to send the line info, via serial, to the arduino and write a program to turn the motors based on the data.

Mike