lane_detection
lane_detection copied to clipboard
Lane Detection algorithm for a Jetson Nano based autonomous vehicle
Robust lane detection and parameter estimation
Lightweight lane detection in realtime with a hyperbola-pair lane model
Table of Contents
-
About The Project
- Method
- Built With
-
Getting Started
- Installation
- Usage
- License
- Contact
About The Project
Extracting the lane for autonomous vehicles is a common task. It can be split into the problem of extracting which pixels in an image belong to lane boundaries and combining those pixels into a lane model.
In the Carolo-Cup [1] competition the second task is more demanding. The lane boundaries are white tape on a dark ground. Lane pixel can be easily found with basic computer vision operations. The challenge lies in creating a robust lane model from the edge pixels.
This repo provides a lane detection pipeline to extract a lane polynomial for the Carolo-Cup on a Jetson Nano in real time. Lane pixel are extracted using edge detection algorithms and processed into a hyperbola-pail lane model from the following paper. [Chen, Qiang, and Hong Wang. "A real-time lane detection algorithm based on a hyperbola-pair model."2]
Method
Lane Boundaries
The following preprocessing steps are taken:
Undistort |
Grayscale |
Blur |
Horizontal Sobel |
Binary |
Erode |
The final image contains vertical edges which represent potential lane boundaries.
Lane Model
The used lane model is called the hyperbola-pair model, because the lane boundaries are model by a hyperbola.
Such a lane is described in the perspective view with the following equation:
Whats special about this model is, that it works in perspective view in contrast to models in birdseye view.
A left and right lane boundary can be described by altering the b parameter. All other parameters remain the same. This means that both lane boundaries influence the lane model, which increases its robustness. Furthermore the difference between the b_left and the b_right parameter stay the same, because that difference is related to the lane width.
The following image shows the influence of the parameters on the lane model.
To calculate the parameters b,c,k a least-squares problem is minimized.
Built With
Getting Started
To get a local copy up and running follow these simple steps.
Installation
- Clone the repo
git clone https://github.com/aelmiger/lane_detection.git cd lane_detection - Install requirements
pip install -r requirements.txt
Usage
Change settings in the 'constants.py' file and run the script
python3 lane_detection_script.py
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Anton Elmiger - [email protected] - email
Undistort
Grayscale
Blur
Horizontal Sobel
Binary
Erode