Mainly using Canny edge detection and Hough line transform, in addition to other image processing techniques. Source code:
https://github.com/georgesung/road_lane_line_detection
Here are example scenarios where the algorithm does -not- work: https://www.youtube.com/watch?v=Fu2Weoa5NOo
آی-ویدئو