主办:陕西省汽车工程学会
ISSN 1671-7988  CN 61-1394/TH
创刊:1976年

汽车实用技术 ›› 2022, Vol. 47 ›› Issue (5): 26-29.DOI: 10.16638/j.cnki.1671-7988.2022.005.006

• 智能网联汽车 • 上一篇    

基于 OpenCV 的直道车道线识别技术研究

曹树星   

  1. 长安大学 汽车学院
  • 出版日期:2022-03-15 发布日期:2022-03-15
  • 通讯作者: 曹树星
  • 作者简介:曹树星(1997—),男,硕士研究生,研究方向为智能网联汽车测试与评价,E-mail:1821354375@qq.com。

Research on Straight Lane Identification Technology Based on OpenCV

CAO Shuxing   

  1. School of Automobile,Chang’an University
  • Online:2022-03-15 Published:2022-03-15
  • Contact: CAO Shuxing

摘要: 人工智能技术的迅速发展使智能驾驶成为热门领域,车道线检测技术作为智能驾驶领 域的关键技术,对其进行准确的识别意义重大。文章针对直道车道线识别问题,设计了一种 基于 OpenCV 的直道车道线识别算法。首先,为了提高检测的准确性,将车道线彩色图片读 取为灰度图;然后通过边缘检测算法中的 Canny 算子提取出车道线边缘;为了进一步减少车 道线识别的干扰以及提高运算效率,设置图片的感兴趣区域;最后基于 Hough 变换对车道线 进行拟合,在拟合时根据左右车道线的斜率范围对左右车道线分别进行拟合。通过 OpenCv 库对设计的算法进行了验证,结果表明,所设计的算法具有较好的准确性,最终达到识别车 道线的目的。

关键词: 智能驾驶;车道线识别;OpenCV;霍夫变换

Abstract: With the rapid development of artificial intelligence technology, intelligent driving has become a hot field. As a key technology in the field of intelligent driving, lane detection technology is of great significance to accurately identify it. Aiming at the problem of straight lane recognition, a straight lane recognition algorithm based on OpenCV was designed. First, in order to improve the accuracy of detection, the color images of lane lines are read as gray images. Then the lane edge is extracted by Canny operator in edge detection algorithm. In order to further reduce the interference of lane recognition and improve the computing efficiency, the region of interest (ROI) of the image is set. Finally, the lane lines are fitted based on Hough transform, and the left and right lane lines are fitted respectively according to the slope range of the left and right lane lines. The OpenCv library is used to verify the algorithm, and the results show that the algorithm has good accuracy, and finally achieves the purpose of identifying lane lines.

Key words: Intelligent drive; Lane line recognition; OpenCV; Hough transform