作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2021, Vol. 47 ›› Issue (9): 217-226,234. doi: 10.19678/j.issn.1000-3428.0058298

• 图形图像处理 • 上一篇    下一篇

高分辨图像区域填充的并行计算方法

曹建立1, 陈志奎1, 王宇新2, 郭禾1   

  1. 1. 大连理工大学 软件学院, 辽宁 大连 116620;
    2. 大连理工大学 计算机科学与技术学院, 辽宁 大连 116024
  • 收稿日期:2020-05-12 修回日期:2020-06-19 发布日期:2020-06-29
  • 作者简介:曹建立(1978-),男,博士研究生,主研方向为并行计算、智能算法;陈志奎,教授、博士生导师;王宇新,副教授、博士;郭禾,教授、博士生导师。
  • 基金资助:
    国家自然科学基金(61672123);中央高校基本科研业务费专项资金(DUT20LAB136)。

Parallel Computing Method of Region Filling for High-Resolution Images

CAO Jianli1, CHEN Zhikui1, WANG Yuxin2, GUO He1   

  1. 1. School of Software Technology, Dalian University of Technology, Dalian, Liaoning 116620, China;
    2. School of Computer Science and Technology, Dalian University of Technology, Dalian, Liaoning 116024, China
  • Received:2020-05-12 Revised:2020-06-19 Published:2020-06-29

摘要: 针对传统种子填充算法无法充分利用多核处理器性能以及需要人工指定种子的不足,提出基于动态连接和并查集的并行随机种子反向填充算法。将填充任务分为随机种子生成、并行填充、连通区域识别、并行合并与反转步骤,并采用C++和CUDA-C语言分别实现各步骤的CPU和GPU版本。在此基础上,从众多参数组合中选择能发挥硬件最佳性能的参数。实验结果表明,相比传统反向填充算法,并行随机种子反向填充算法能充分利用多核、异构处理器的多线程并行能力,在处理6种不同分辨率的单张和批量图像时获得了平均3.84倍和4.43倍的加速比,其中在处理8 KB高分辨图像时,最高取得6.05倍和7.09倍的加速比。

关键词: 区域填充, 种子填充, 高分辨图像, 多线程, 并查集算法, 反向填充算法

Abstract: The traditional seed filling algorithms usually fail to make full use of the performance of a multi-core processor, and require manual intervention to specify seeds.To address the problem, a parallel random seed filling algorithm based on dynamic connection and Union-Find sets is designed.The algorithm divides the filling task into four stages:random seed generation, parallel filling, connected region recognition, and parallel union and reverse.C++and CUDA-C are used to implement each stage on CPU and GPU.On this basis, the optimal parameter configuration is chosen from various parameter configurations to maximize the hardware performance.The experimental results show that compared with the traditional reverse filling algorithm, the proposed algorithm can make full use of the multithreading performance of multi-core and heterogeneous processors.When processing six kinds of images of different resolutions, the proposed algorithm provides an average speedup of 3.84 times for single image processing and 4.43 times for batch image processing.Additionally, it provides a speedup of 6.05 times and 7.09 times for the processing of high-resolution images of 8KB.

Key words: region filling, seed filling, high-resolution image, multithreading, Union-Find algorithm, conversely filling algorithm

中图分类号: