计算机应用 ›› 2010, Vol. 30 ›› Issue (10): 2774-2776.

• 软件过程技术与先进计算 • 上一篇    下一篇

GPU加速的二值图连通域标记并行算法

覃方涛1,房斌2   

  1. 1. 重庆大学计算机学院模式识别研究所;重庆市委党校信息处
    2. 重庆大学
  • 收稿日期:2010-04-07 修回日期:2010-05-23 发布日期:2010-09-21 出版日期:2010-10-01
  • 通讯作者: 覃方涛

GPU accelerated parallel labeling algorithm of connected-domains in binary images

  • Received:2010-04-07 Revised:2010-05-23 Online:2010-09-21 Published:2010-10-01

摘要: 结合NVIDIA公司统一计算设备架构(CUDA)下的图形处理器(GPU)并行结构和硬件特点,提出了一种新的二值图像连通域标记并行算法,高速有效地标识出了二值图的连通域位置及大小,大幅缩减了标记时间耗费。该算法通过搜索邻域内最小标号值的像素点对连通域进行标记,各像素点处理顺序不分先后并且不相互依赖,因此可以并行执行。算法效率不受连通域形状及数量的影响,具有很好的鲁棒性。实验结果表明,该并行算法充分发挥了GPU并行处理能力,在处理高分辨率与多连通域图像时效率为一般CPU标记算法的300倍,比OpenCV的优化函数(CPU)效率高近17倍。

关键词: GPU加速, 连通域标记, 并行化, 统一计算设备架构, 8邻域

Abstract: In combination of NVIDIA's Graphics Processing Unit (GPU) parallel architecture and hardware features under Compute Unified Device Architecture (CUDA) architecture, a new parallel labeling algorithm of connected domain was proposed for binary images. It effectively located the connected domain of the binary image and recorded its size at high speed, and significantly reduced the marking time. It recognized the connected domain through searching the minimum labeled pixel value in neighborhood. Because the processing sequence of each pixel is not in particular order and independent from each other, it can be dealt in parallel. The calculation efficiency of the algorithm is independent of the shapes and the quantity of the connected regions, and the algorithm has good robustness. The experimental results show that the algorithm fully plays the parallel processing capability of GPU, and can get a more than 300 times speedup than general algorithm based on CPU and 17 times speedup than OpenCV function (CPU) in processing high-resolution images and multi-connected-domain images.

Key words: GPU acceleration, connected-domain labeling, parallelization, Compute Unified Device Architecture (CUDA), 8-neighborhood

中图分类号: