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.

thanks for the tutorial.
but as I'm a starter in OpenCV, Let me know what's gonna be the output (of the processed image?)
can i assign it on a variable to work with the further programming? :roll_eyes: