This is a project from Udacity's Self-driving Car Engineer Nanodegree. The aim of this project is to develop a computer vision pipeline that can robustly detect the lane lines and overlay a projection of the lane detected, including information on the curvature of the lane and the position of the car from the center of the lane. The pipeline consists of the following:
The main challenge in this project is filtering out the pixels corresponding to the lanes, as much as possible. Although the road markings may be rather distinct from the road for human eyes, with the markings being either yellow or white, this has proven to be rather difficult for computers. Due to different lighting conditions and imperfections in the road, this task can be rather challenging. An approach used in this project was the usage of color spaces like HSL. RGB is not suitable because the color information is tied deeply with the light intensity information unlike HSV or HSL. In particular, the S channel and the L channel is very useful in filtering out the lighter coloured yellow and white lane markings. Markings that are further away may not be captured as prominently, which is where Sobel operators come into play. Sobel can detect strong gradients in either the x or y axis. By combining them, using the magnitude of both x and y results and the direction of the gradient, we can get detections previously missed by color thresholds alone.
Under the pinhole camera model, parallel lines along the camera view direction converge to a common point, called the vanishing point. Although, straight lines can still be detected without correcting for this, information on the curvature is lost for curved lanes, as the distance between the 2 lanes seem to be decreasing even if they are parallel. Doing a bird's eye view tranform helps to make these lanes parallel again.
For more details, visit the project repo.