基于OpenCL的车道线检测算法加速
Acceleration of Lane Detection Algorithm Based on OpenCL
DOI: 10.12677/MOS.2024.132099, PDF,   
作者: 葛品仕, 刘甜甜:上海理工大学健康科学与工程学院,上海
关键词: OpenCL车道线检测霍夫变换异构并行OpenCL Lane Line Detection Hough Transform Heterogeneous Parallel
摘要: 随着图像处理和算法复杂度的逐步提高,传统基于CPU的车道线检测算法在运行时会消耗大量时间,这极大地影响了算法的实时性。为了提升车道线检测算法的运行速度,本文采用了基于OpenCL的并行加速技术对传统的道路车道线检测算法进行优化。在处理过程中,首先对图像进行灰度化处理,然后利用OpenCL实现了高斯滤波、边缘检测和霍夫变换过程的内核调用,并在GPU上并行执行,这大大提升了这三个过程的运行速度,尤其是霍夫变换过程,其加速比达到了32.771。最后,通过筛选和聚类检测到的直线参数,实现了准确的车道线检测。在对1280 × 720大小的图片进行检测时,该算法相较于使用CPU处理的方法,其加速比能达到5.497,平均检测一张图片只需7.581 ms。这表明,本文提出的算法可以满足实时检测车道线的需求。
Abstract: As the sophistication of image processing techniques and the complexity of algorithms continue to advance, traditional lane detection methodologies executed on Central Processing Units (CPUs) have been increasingly challenged by substantial computational demands, which greatly affects the re-al-time performance of the algorithm. In order to enhance the running speed of the lane detection algorithm, this paper adopts parallel acceleration technology based on OpenCL to optimize the tra-ditional road lane detection algorithm. In the processing phase, the image is first converted to greyscale, then Gaussian filtering, edge detection, and Hough transform processes are implemented using OpenCL kernel calls, and executed in parallel on the GPU. This greatly increases the running speed of these three processes, especially the Hough transform process, where the acceleration ra-tio reaches 32.771. Finally, by filtering and clustering the detected line parameters, accurate lane detection is achieved. When detecting images of size 1280 × 720, this algorithm, compared to the CPU processing method, has an acceleration ratio of 5.497, and it takes an average of only 7.581 milliseconds to detect an image. This demonstrates that the algorithm proposed in this paper can meet the demand for real-time lane detection.
文章引用:葛品仕, 刘甜甜. 基于OpenCL的车道线检测算法加速[J]. 建模与仿真, 2024, 13(2): 1039-1049. https://doi.org/10.12677/MOS.2024.132099

参考文献

[1] 李亚娣, 黄海波, 李相鹏, 等. 基于Canny算子和Hough变换的夜间车道线检测[J]. 科学技术与工程, 2016, 16(31): 234-237+242.
[2] 杨喜宁, 段建民, 高德芝, 等. 基于改进Hough变换的车道线检测技术[J]. 计算机测量与控制, 2010, 18(2): 292-294+298.
[3] Zakaria, N.J., Shapiai, M.I., Ghani, R.A., Yassin, M.N.M., Ibrahim, M.Z. and Wahid, N. (2023) Lane Detection in Autonomous Vehicles: A Systematic Review. IEEE Access, 11, 3729-3765. [Google Scholar] [CrossRef
[4] 陈政宏, 李爱娟, 王希波, 等. 基于改进Hough变换的结构化道路车道线识别[J]. 科学技术与工程, 2020, 20(26): 10829-10834.
[5] 周发华, 陈继清, 杨蓉. 基于改进Hough变换和斜率特征的车道线识别[J]. 现代电子技术, 2023, 46(7): 180-186.
[6] 顾友霖, 郑再象, 刘洋, 等. 基于霍夫变换的车道线检测跟踪及车道偏离预警[J]. 南方农机, 2023, 54(9): 129-132.
[7] 陈月正, 范文宇, 叶蕴森, 等. 基于OpenCV的车道线检测方法的研究[J]. 微纳电子与智能制造, 2022, 4(4): 82-87.
[8] 李旭. 基于CUDA加速的车道线检测算法研究[D]: [硕士学位论文]. 大连: 大连理工大学, 2020.
[9] Luo, G., Zhou, R.G., Liu, X., et al. (2018) Fuzzy Matching Based on Gray-scale Difference for Quantum Images. International Journal of Theoretical Physics, 57, 2447-2460. [Google Scholar] [CrossRef
[10] 常新旭, 王珂, 张杨, 等. 异构并行编程框架综述[J]. 信息系统工程, 2022(8): 135-138.
[11] Munshi, A. (2009) The OpenCL Specification. 2009 IEEE Hot Chips 21 Symposium (HCS), Stanford, 23-25 August 2009, 1-314. [Google Scholar] [CrossRef