Created a more complex pipline to detect road lines from a roof-mounted camera. The result not only detects the curved lane in real time, but also calculates the lane's curvature radius how off-center the car is (very useful data for autonomous driving).
Despite the satisfying result shown above, the algorithm does not perform well with strong glare or obstacles. This is why CNN architectures ultimately needs to be employed. Poke around my repos to find quite a few of CNN related projects.
Since I used Jupyter Notebook for this project, this file has the algorithm broken down step by step and the visualization of what each step does to the input media.
1. Use camera calibration matrix and distortion from chessboard images to correct distortion of road images
5. Determine the curvature of the lane and vehicle position with respect to center and warp result back to original image
You will need Python 3, numpy, matplotlib, OpenCV, moviepy, and os install in your environment to run the entire jupyter notebook. I highly recommend creating a virtual environment with conda to organize the dependencies.
The lane is detected in green with red and blue warped parabolas indicating the lane boundaries. The curvature and offset should have reasonable values.