Technical requirements
Our lane detection pipeline requires quite a lot of code. We will explain the main concepts, and you can find the full code on GitHub at https://github.com/PacktPublishing/Hands-On-Vision-and-Behavior-for-Self-Driving-Cars/tree/master/Chapter3.
For the instructions and code in this chapter, you need the following:
- Python 3.7
- The OpenCV-Python module
- The NumPy module
- The Matplotlib module
To identify the lanes, we need some images and a video. While it's easy to find some open source database to use for this, they are usually only available for non-commercial purposes. For this reason, in this book, we will use images and video generated by two open source projects: CARLA, a simulator useful for autonomous driving tasks, and Speed Dreams, an open source video game. All the techniques also work with real-world footage, and you are encouraged to try them on some public datasets, such as CULane or KITTI.
The Code in Action videos...