摘要
针对中央处理器(CPU)平台中值滤波算法在实际应用中运算速率低且实时信号处理性能较差的问题,提出了一种基于图形处理器(GPU)的并行高速中值滤波算法。该算法采用统一计算设备架构(CUDA)并行架构对大规模数据处理进行了优化,从而有效提高了中值滤波算法的计算效率,实现了中值滤波的实时数据处理。通过构建GPU可任意伸缩的动态数组、优化多维索引的线性化方法解决了GPU动态显存空间分配问题。仿真试验结果表明:基于TITAN X GPU的5×5中值滤波,对4096像素×4096像素的图像处理计算速度比CPU平台提高了438倍。在同等计算规模条件下GPU高速中值滤波算法可大大提高计算性能。
Low computational rate and poor performance in real-time signal processing are the main problems for the median filtering algorithm in the practical applications. This paper proposed a high-speed parallel median filtering algorithm based on Graphics Processing Unit(GPU). The algorithm uses Compute Unified Device Architecture(CUDA) to optimize large-scale data processing and it is implemented on NVIDIA GPUs to improved its computational efficiency. The GPU's dynamic memory space is allocated by constructing GPU-scalable dynamic array and optimization of multidimensional index linearization methods. Experiment results show that, the 5×5 median filtering based on TITAN X GPU is approximately 438x faster than CPU algorithm for processing of 4096×4096 pixel images. The GPU based median filtering can greatly improve the computing performance of algorithm under the same computing conditions.
引文
[1]Wo?niak M,Po?ap D,Gabryel M,et al.Can we process 2D images using artificial bee colony?[C]∥International Conference on Artificial Intelligence and Soft Computing,Springer,Cham,2015:660-671.
[2]赵海英,张小利,李雄飞,等.基于多尺度Meanshift图像去噪算法[J].吉林大学学报:工学版,2014,44(5):1417-1422.Zhao Hai-ying,Zhang Xiao-li,Li Xiong-fei,et al.Image denoising algorithom basid on multi-scale Meanshift[J].Journal of Jilin University(Engineering and Technology Edition),2014,44(5):1417-1422.
[3]许景波,袁怡宝,崔晓萌,等.表面测量中高斯滤波中线的有理逼近实现[J].吉林大学学报:工学版,2014,44(5):1347-1352.Xu Jing-bo,Yuan Yi-bao,Cui Xiao-meng,et al.Rational approximation implementation approach to determine Gaussian filtering mean line in surface roughness measurement[J].Journal of Jilin University(Engineering and Technology Edition),2014,44(5):1347-1352.
[4]Juhola M,Katajainen J,Raita T.Comparison of algorithms for standard median filtering[J].IEEE Transactions on Signal Processing,1991,39(1):204-208.
[5]Tomasi C,Manduchi R.Bilateral filtering for gray and color images[C]∥Sixth International Conference on Computer Vision,Bombay,India,1998:839-846.
[6]Jwo D J,Wang S H.Adaptive fuzzy strong tracking extended Kalman filtering for GPS navigation[J].IEEE Sensors Journal,2007,7(5):778-789.
[7]王宇新,贺圆圆.基于FPGA的快速中值滤波算法[J].计算机应用研究,2009,26(1):224-226.Wang Yu-xin,He Yuan-yuan.FPGA-based algorithm of fast median filter[J].Application Research of Computers,2009,26(1):224-226.
[8]Owens J D,Houston M,Luebke D,et al.GPUcomputing[J].Proceedings of the IEEE,2008,96(5):879-899.
[9]Ranka S,Sahni S.Efficient serial and parallel algorithms for median filtering[J].IEEE Transactions on Signal Processing,1991,39(6):1462-1466.
[10]Garland Michael,Grand S L,Nickolls J,et al.Parallel computing experiences with CUDA[J].IEEE Micro,2008,28(4):13-27.
[11]Ryoo S,Rodrigues C I,Baghsorkhi S S,et al.Optimization principles and application performance evaluation of a multithreaded GPU using CUDA[C]∥Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming,Salt Lake City,Utah,USA,2008:73-82.
[12]Battiato P S.High performance median filtering algorithm based on NVIDIA GPU computing[J/OL].[2018-01-04].http:∥ceur-ws.org/Vol-1543/p1.pdf.