基于Opencv的车道线检测:1. 图像加载;2.图像预处理:图片灰度化,高斯滤波;3.Cany边缘检测;4.感兴趣区域检测;5.霍夫直线检测 ;6.直线拟合;7.车道线叠加;8.图片和视频测试;9.可视化界面pyqt5 (可选)。
- python 3.x
- numpy
- matplotlib
- opencv-python
- pyqt5 (option)
- Clone and install.
$ git clone [email protected]:yangliuly1/LaneDetectionV1.0.git
$ cd LaneDetectionV1.0
$ pip install -r requirements.txt
- Test.
# picture test
$ python .\lanedetection.py -i ./assets/1.jpg -o ./assets/1_out.jpg
# video test
$ python .\lanedetection.py -i ./assets/project_video.mp4 -o ./assets/project_video_out.mp4
- Visualization.
# install package
$ pip install pyqt5
# run
$ python mainwindow.py
- Done:可视化界面。