OpenCL acceleration algorithm of image median filtering based on heterogeneous platform

  • XIAO Shiyang ,
  • WANG Lei ,
  • DU Ying ,
  • XIAO Han
Expand
  • 1. School of Civil Engineering, Southeast University, Nanjing 211189, China; 2. School of Information Science and Technology, Zhengzhou Normal University, Zhengzhou 450044, China; 3. School of Geography and Tourism, Zhengzhou Normal University, Zhengzhou 450044, China

Received date: 2022-09-28

  Online published: 2024-03-15

Abstract

Image noise reduces the signal-to-noise ratio and quality of image, and denoising is one of the important steps in image processing. In this paper, an image median filtering parallel fast denoising filtering algorithm based on Open Computing Language(OpenCL)is proposed. The architecture characteristics of OpenCL and median filtering processing flow are introduced. According to the concurrent structure characteristics of Graphics Processing Unit(GPU), the image median filtering function module is optimized in parallel, and the complexity of the algorithm is reduced. By fully activating the work-groups and work-items in the workspace to improve the efficiency of data access, optimize the configuration parameters of the kernel work-group, the parallel processing of the median filter is realized. The experimental results show that under the condition that the image quality remains unchanged, compared- DOI:10.3969/j.issn.1000-1565.2024.01.012基于异构平台的图像中值滤波的OpenCL加速算法肖诗洋1,王镭2,杜莹3,肖汉2(1.东南大学 土木工程学院,江苏 南京 211189;2.郑州师范学院 信息科学与技术学院,河南 郑州 450044;3.郑州师范学院 地理与旅游学院,河南 郑州 450044)摘 要:图像噪声降低了图像信噪比和质量,去噪是图像处理工作的重要环节之一.本文提出了一种基于开放式计算语言(OpenCL)架构的图像中值滤波快速降噪并行算法.介绍了OpenCL体系结构特点和中值滤波处理流程.根据图形处理器(GPU)的并发结构特点,对图像中值滤波功能模块进行了并行优化,降低了算法复杂度.通过充分激活NDRange索引空间中的工作组和工作项来提高数据访问效率,优化内核工作组配置参数,实现了中值滤波器的并行处理.实验结果表明,在图像质量保持不变的情况下,与基于CPU的串行算法、基于开放多处理(OpenMP)并行算法和基于统一计算设备架构(CUDA)并行算法性能相比,图像中值滤波并行算法在OpenCL架构下NVIDIA GPU计算平台上分别获得了29.74、17.29、1.15倍的加速比.验证了算法的有效性和平台的可移植性,基本满足应用的实时性处理要求.关键词:中值滤波;椒盐噪声;图形处理器;开放式计算语言;并行算法中图分类号:TP311 文献标志码:A 文章编号:1000-1565(2024)01-0092-12OpenCL acceleration algorithm of image median filtering based on heterogeneous platformXIAO Shiyang1, WANG Lei2, DU Ying3, XIAO Han2(1. School of Civil Engineering, Southeast University, Nanjing 211189, China;2. School of Information Science and Technology, Zhengzhou Normal University, Zhengzhou 450044, China;3. School of Geography and Tourism, Zhengzhou Normal University, Zhengzhou 450044, China)Abstract: Image noise reduces the signal-to-noise ratio and quality of image, and denoising is one of the important steps in image processing. In this paper, an image median filtering parallel fast denoising filtering algorithm based on Open Computing Language(OpenCL)is proposed. The architecture characteristics of OpenCL and median filtering processing flow are introduced. According to the concurrent structure characteristics of Graphics Processing Unit(GPU), the image median filtering function module is optimized in parallel, and the complexity of the algorithm is reduced. By fully activating the work-groups and work-items in the workspace to improve the efficiency of data access, optimize the configuration parameters of the kernel work-group, the parallel processing of the median filter is realized. The experimental results show that under the condition that the image quality remains unchanged, compared- 收稿日期:2022-09-28;修回日期:2023-02-11 基金项目:国家自然科学基金资助项目(61250007;61572444);河南省高等学校重点科研项目(22A520049) 第一作者:肖诗洋(2000—),男,东南大学在读硕士研究生.E-mail: xsytt626@163.com 通信作者:肖汉(1970—),男,郑州师范学院教授,主要从事并行算法研究与设计、图像并行处理方向研究.E-mail: xiaohan70@163.com第1期肖诗洋等:基于异构平台的图像中值滤波的OpenCL加速算法with the serial algorithm based on CPU, the parallel algorithm based on Open Multi-Processing(OpenMP)and the parallel algorithm based on Compute Unified Device Architecture(CUDA), the parallel algorithm of image median filtering achieves 29.74 times, 17.29 times and 1.15 times acceleration ratio on the NVIDIA GPU computing platform based on OpenCL architecture, respectively. The effectiveness of the algorithm and the portability of the platform are verified, and the real-time processing requirements of the application are basically met.

Cite this article

XIAO Shiyang , WANG Lei , DU Ying , XIAO Han . OpenCL acceleration algorithm of image median filtering based on heterogeneous platform[J]. Journal of Hebei University(Natural Science Edition), 2024 , 44(1) : 92 -103 . DOI: 10.3969/j.issn.1000-1565.2024.01.012

References

[1] HIDAYETOGLU M, BICER T, DE G SG, et al. MemXCT: design, optimization, scaling, and reproducibility of x-ray tomography imaging[J]. IEEE T Parall Distr, 2022, 33(9): 2014-2031.
[2] CHEN C. Acceleration of vector bilateral filtering for hyperspectral imaging with GPU[J]. Int J Circ Theor App, 2021, 49(5): 1502-1514. DOI: 10.1002/cta.2973.
[3] ZENG H, CAI J R, LI L D, et al. Learning image-adaptive 3D lookup tables for high performance photo enhancement in real-time[J]. IEEE T Pattern Anal, 2022, 44(4): 2058-2073. DOI:10.1109/TPAMI.2020.3026740.
[4] ZHAO H L, JIANG L, JIN X G, et al. Constant time texture filtering[J]. Visual Computer, 2018, 34(1):83-92. DOI:10.1007/s00371-016-1315-z.
[5] PANG K, SHI Z F, XU J T, et al. Adaptive partition-cluster-based median filter for random-valued impulse noise removal[J]. J Circuit Syst Comp, 2018, 27(7):511-523. DOI:10.1142/S0218126618501104.
[6] LIU S T, HAN J. Toward energy-efficient stochastic circuits using parallel Sobol sequences[J]. IEEE T VLSI Syst, 2018, 26(7):1326-1339. DOI:10.1109/TVLSI.2018.2812214.
[7] CADENAS J O, MEGSON G M, SHERRATT R S. Median filter architecture by accumulative parallel counters[J]. IEEE T Circuits-II, 2015, 62(7):661-665. DOI:10.1109/TCSII.2015.2415655.
[8] ODED G. Efficient scalable median filtering using histogram-based operations[J]. IEEE T Image Process, 2018, 27(5):2217-2228. DOI:10.1109/TIP.2017.2781375.
[9] 李余钱,苏光大.基于FPGA的自适应阈值边缘检测的实现[J].仪表技术与传感器,2016(4):57-59.
[10] SACHIN B, AKSHAY G, MUNESH C T. SPMD based time sharing intelligent approach for image denoising[J]. J Intell Fuzzy Syst, 2017, 32(5):3561-3573. DOI:10.3233/jifs-169292.
[11] 刘佳,路铭,李哲英.基于NoC结构的图像中值滤波并行处理模式分析[J].计算机科学,2012,39(1):311-314.
[12] 陈思润,顾乃杰,苏俊杰,等.基于ARM架构的滤波函数优化[J].计算机应用与软件,2018, 35(9):138-143.
[13] ZHAO H L, GAO D D, WANG M, et al. Real-time edge-aware weighted median filtering on the GPU[J]. Comput Graph-UK, 2016, 61(8):11-18. DOI:10.1016/j.cag.2016.09.003.
[14] MAO L, DONG Y M, LI J, et al. Use of GPU technology parallelization denoising method[J]. Computers and Applied Chemistry, 2012, 29(11):1379-1383. DOI:10.16866/j.com.app.chem2012.11.025.
[15] 廖文献,黄兴利.基于Cortex嵌入式多处理器系统的图像中值滤波算法并行化的研究[J].计算机系统应用, 2017, 26(2):168-173. DOI:10.15888/j.cnki.csa.005624.
[16] MURSAEV A K, GRECHUKHIN M N. Implementation of image median filters using programmable logic devices[J]. Instrum Exp Tech, 2014, 57(6):688-691. DOI:10.1134/S0020441214060098.
[17] 张怡卓,许超,许雷,等.基于FPGA的地板图像采集和中值滤波设计[J].安徽农业科学,2014, 42(17):5683-5685. DOI: 10.13989/j.cnki.0517-6611.2014.17.128.
[18] VIVEK S B, ALEXANDRU T, MORITZ S, et al. A novel image impulse noise removal algorithm optimized for hardware accelerators[J]. J Signal Process Sys, 2017, 89(2):225-242. DOI:10.1007/s11265-016-1187-5.
[19] SOTOS J G. Biotechnology and the lifetime of technical civilizations[J]. Int J Astrobiol, 2019, 18(5): 445-454. DOI:10.1017/S1473550418000447.
[20] AGARWAL S, JUNG K H. Median filtering forensics based on optimum thresholding for low-resolution compressed images[J]. Multimed Tools Appl, 2022, 81(5): 7047-7062. DOI:10.1007/s11042-022-11945-w.
[21] YILDIRIM M. Analog circuit implementation based on median filter for salt and pepper noise reduction in image[J]. Analog Integr Circ S, 2021, 107(1): 195-202. DOI:10.1007/s10470-021-01820-3. (
Outlines

/

〈 〉