光电工程, 2011, 38 (7): 86, 网络出版: 2011-08-10
基于BFS 的多核并行连通区域检测算法
Parallel Connected Component Detection Algorithm for Multi-core Based on BFS
摘要
针对一般的连通区域检测算法速度较慢、需多次扫描等问题,本文结合队列的先进先出思想,提出基于广度优先搜索(BFS)的连通区域检测算法。该算法是一种非递归的算法,只需要一次扫描即可记录各个连通区域的点,能有效地降低存储空间和运行时间。本文提出基于特定扫描模板处理像素点,避免重复扫描,利用多核并行处理加速算法,实现了真正的并行运算。利用连通区域自左上至右下有序排列的特性,提出一种逆向合并法,简化了区域合并的复杂度。实验结果表明检测速度有了很大提高。
Abstract
The speed of general connected component detection algorithms was slow, and most of these algorithms needed more than one scanning. A connected component detection algorithm was presented based on Breadth First Search(BFS) with the First In First Out (FIFO) queue. The algorithm was a non-recursive algorithm, the connected component could be detected by one scanning, and the storage space and running time could be reduced. We used a particular scanning template to process each pixel, avoiding more than one scanning. The multi-core parallel processing was used to accelerate the algorithm, and it realized the truly parallel computing. With the connected regions ordered from top-left to bottom-right, a reverse merging method was proposed to simplify the complexity of region merging. The experimental results show that the detection rate has been greatly improved.
周恋玲, 叶玉堂, 刘霖, 张静, 谢煜, 孙强, 姚蛟. 基于BFS 的多核并行连通区域检测算法[J]. 光电工程, 2011, 38(7): 86. ZHOU Lian-ling, YE Yu-tang, LIU Lin, ZHANG Jing, XIE Yu, SUN Qiang, YAO Jiao. Parallel Connected Component Detection Algorithm for Multi-core Based on BFS[J]. Opto-Electronic Engineering, 2011, 38(7): 86.