中国光学, 2017, 10 (6): 737, 网络出版: 2017-12-25
Canny算法的GPU并行加速
Parallel acceleration of Canny algorithm based on GPU
摘要
Canny算法在PC机上的执行速度较慢, 这极大地限制了其实用性。本文在前人的研究基础上对算法进行更深的优化和改进。首先在VS2012开发环境下利用数字图像处理技术对原算法进行原理上的改进, 再利用GPU流处理器数量众多的优势以及强大的多线程并发执行能力对Canny算法进行并行加速。在500 pixel×500 pixel的图片上, 对本文算法和原Canny算法进行了实验验证。实验结果表明, 在4 096 pixel×4 096 pixel大小的图片上采用本文的GPU移植算法处理后, 执行速度从80 ms降到了6 ms以内。在不影响边缘检测效果的前提下极大地提高了算法的实用性。
Abstract
Due to the slow execution speed of Canny algorithm in PC, the practicality of this algorithm is greatly restricted. Based on the previous studies, we further optimizes and improves the algorithm. First of all, we use the digital image processing technology to improve the original algorithm under the development environment of VS2012, and then accelerate the Canny algorithm by taking advantage of the large number of GPU stream processors and powerful multithreaded concurrent execution capability. Experiments were made on the improved algorithm and the original Canny algorithm. Experimental results show that in the 4 096×4 096 pixel-size images, the GPU migration algorithm presented in this paper can reduce the execution speed from 80 ms to less than 6 ms. Through this improvement, it can greatly improve the practicability of the algorithm without affecting the edge detection effect.
张帆, 韩树奎, 张立国, 王文胜. Canny算法的GPU并行加速[J]. 中国光学, 2017, 10(6): 737. ZHANG Fan, HAN Shu-kui, ZHANG Li-guo, WANG Wen-sheng. Parallel acceleration of Canny algorithm based on GPU[J]. Chinese Optics, 2017, 10(6): 737.