Journal of Jilin University(Engineering and Technology Edition) ›› 2019, Vol. 49 ›› Issue (3): 979-985.doi: 10.13229/j.cnki.jdxbgxb20180050

Previous Articles     Next Articles

High speed median filtering algorithm based on graphics processing unit

Tohtonur1,2(),Hai⁃long ZHANG1,3(),Jie WANG1,Na WANG1,3,Xin⁃chen YE1,Wan⁃qiong WANG1   

  1. 1. Xinjiang Astronomical Observatory, Chinese Academy of Sciences, Urumqi 830011, China
    2. University of Chinese Academy of Sciences, Beijing 100049, China
    3. Key Laboratory of Radio Astronomy, Chinese Academy of Sciences, Nanjing 210008, China
  • Received:2018-01-16 Online:2019-05-01 Published:2019-07-12
  • Contact: Hai?long ZHANG E-mail:nuer@xao.ac.cn;zhanghailong@xao.ac.cn

Abstract:

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.

Key words: information processing technology, signal processing, median filtering, compute unified device architecture(CUDA), graphics processing unit(GPU), parallel algorithm

CLC Number: 

  • TN911.7

Fig.1

"

Fig.2

Median filtering on an image"

Fig.3

GPU thread architecture"

Fig.4

Example of indexes linearization fromtwo to one index"

Fig.5

1D median filter thread organization"

Fig.6

2D median filter thread organization"

Table 1

Hardware device specific parameters"

SpecificationsXeon(R) E5?2630GTX TITAN X
Total amount of core83072
Frequency2.40 GHz1000 MHz
Global memory64 GB(RAM)12 GB
Cache size20480 kB3072 kB
Shared memory per block-49152 bytes
Warp size-32
Maximum threads per block-1024
Maximum threads per multiprocessor-2048
Max dimension size of a block (x,y,z)-(1024, 1024, 64)
Registers available per block-65536

Fig.7

Response time and acceleration ratio ofserial and parallel algorithms"

Fig.8

Comparison of response time between serial and parallel algorithms"

Table 2

3×3 median filtering processing time"

Image sizeXeon(R) E5?2630GTX TITAN X
128×1285.5590.3106
256×25623.05340.4264
512×51299.95520.6893
1024×1024331.8811.8339
2048×20481117.414.783
4096×40963870.3815.8201

Table 3

5×5 median filtering processing time"

Image sizeXeon(R) E5?2630GTX TITAN X
128×12837.93450.4178
256×256151.9730.8302
512×512645.7382.0857
1024×10242281.346.6295
2048×20488131.8720.8194
4096×409627940.263.7018

Fig.9

TITAN X GPU parallel algorithmacceleration ratio"

1 WoźniakM, PołapD, GabryelM, 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.
ZhaoHai⁃ying, ZhangXiao⁃li, LiXiong⁃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.
XuJing⁃bo, YuanYi⁃bao, CuiXiao⁃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 JuholaM, KatajainenJ,RaitaT. Comparison of algorithms for standard median filtering[J]. IEEE Transactions on Signal Processing,1991,39(1):204⁃208.
5 TomasiC, ManduchiR. Bilateral filtering for gray and color images[C]∥Sixth International Conference on Computer Vision,Bombay,India,1998:839⁃846.
6 JwoD J, WangS 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.
WangYu⁃xin, HeYuan⁃yuan. FPGA⁃based algorithm of fast median filter[J]. Application Research of Computers,2009,26(1):224⁃226.
8 OwensJ D, HoustonM, LuebkeD, et al. GPU computing[J]. Proceedings of the IEEE,2008,96(5):879⁃899.
9 RankaS, SahniS. Efficient serial and parallel algorithms for median filtering[J]. IEEE Transactions on Signal Processing,1991,39(6):1462⁃1466.
10 MichaelGarland,GrandS L,NickollsJ,et al.Parallel computing experiences with CUDA[J]. IEEE Micro,2008,28(4):13⁃27.
11 RyooS, RodriguesC I, BaghsorkhiS 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 BattiatoP S. High performance median filtering algorithm based on NVIDIA GPU computing[J/OL].[2018⁃01⁃04].http:∥ceur⁃ws.org/Vol⁃1543/p1.pdf.
[1] Lu⁃tao LIU,Na LI. Source detection based on coprime array [J]. Journal of Jilin University(Engineering and Technology Edition), 2019, 49(3): 986-993.
[2] Yin⁃juan FU,Yong LI,Li⁃qin XU,Kun⁃hui ZHANG. Design and analysis of NLFM⁃Costas RF stealth radar signal [J]. Journal of Jilin University(Engineering and Technology Edition), 2019, 49(3): 994-999.
[3] YING Huan,LIU Song-hua,TANG Bo-wen,HAN Li-fang,ZHOU Liang. Efficient deterministic replay technique based on adaptive release strategy [J]. Journal of Jilin University(Engineering and Technology Edition), 2018, 48(6): 1917-1924.
[4] LIU Zhong-min,WANG Yang,LI Zhan-ming,HU Wen-jin. Image segmentation algorithm based on SLIC and fast nearest neighbor region merging [J]. Journal of Jilin University(Engineering and Technology Edition), 2018, 48(6): 1931-1937.
[5] SHAN Ze-biao,LIU Xiao-song,SHI Hong-wei,WANG Chun-yang,SHI Yao-wu. DOA tracking algorithm using dynamic compressed sensing [J]. Journal of Jilin University(Engineering and Technology Edition), 2018, 48(6): 1938-1944.
[6] YAO Hai-yang, WANG Hai-yan, ZHANG Zhi-chen, SHEN Xiao-hong. Reverse-joint signal detection model with double Duffing oscillator [J]. 吉林大学学报(工学版), 2018, 48(4): 1282-1290.
[7] QUAN Wei, HAO Xiao-ming, SUN Ya-dong, BAI Bao-hua, WANG Yu-ting. Development of individual objective lens for head-mounted projective display based on optical system of actual human eye [J]. 吉林大学学报(工学版), 2018, 48(4): 1291-1297.
[8] CHEN Tao, CUI Yue-han, GUO Li-min. Improved algorithm of multiple signal classification for single snapshot [J]. 吉林大学学报(工学版), 2018, 48(3): 952-956.
[9] CHEN Mian-shu, SU Yue, SANG Ai-jun, LI Pei-peng. Image classification methods based on space vector model [J]. 吉林大学学报(工学版), 2018, 48(3): 943-951.
[10] MENG Guang-wei, LI Rong-jia, WANG Xin, ZHOU Li-ming, GU Shuai. Analysis of intensity factors of interface crack in piezoelectric bimaterials [J]. 吉林大学学报(工学版), 2018, 48(2): 500-506.
[11] LIN Jin-hua, WANG Yan-jie, SUN Hong-hai. Improved feature-adaptive subdivision for Catmull-Clark surface model [J]. 吉林大学学报(工学版), 2018, 48(2): 625-632.
[12] WANG Ke, LIU Fu, KANG Bing, HUO Tong-tong, ZHOU Qiu-zhan. Bionic hypocenter localization method inspired by sand scorpion in locating preys [J]. 吉林大学学报(工学版), 2018, 48(2): 633-639.
[13] YU Hua-nan, DU Yao, GUO Shu-xu. High-precision synchronous phasor measurement based on compressed sensing [J]. 吉林大学学报(工学版), 2018, 48(1): 312-318.
[14] LIU Dong-liang, WANG Qiu-shuang. Instantaneous velocity extraction method on NGSLM data [J]. 吉林大学学报(工学版), 2018, 48(1): 330-335.
[15] WANG Fang-shi, WANG Jian, LI Bing, WANG Bo. Deep attribute learning based traffic sign detection [J]. 吉林大学学报(工学版), 2018, 48(1): 319-329.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] ZHAO Li, YUAN Zhen-zhou, LI Zhi-hong, LI Yan-hong. Facility layout model of urban comprehensive passenger transfer hub based on activity correlation[J]. 吉林大学学报(工学版), 2011, 41(05): 1246 -1251 .
[2] DAI Han-da, QU Jian-jun,ZHANG Qian-xing. Ultra lubrication tribological characteristic of MoS2/PTFE composite versus quartz glass under water lubrication[J]. 吉林大学学报(工学版), 2010, 40(04): 1015 -1018 .
[3] SU Chang, FU Li-ming, WEI Jun, LI Shuo, HUANG Lei, CAO Yue. Design method in exterior color based Kansei engineering and principal component analysis[J]. 吉林大学学报(工学版), 2016, 46(5): 1414 -1419 .
[4] GUO Zi-Zheng, CHEN Chong-Shuang, WANG Xin, CHEN Ya-Qing, TAN Yong-Gang. Driving behavior risk status identification |model based on FCM[J]. 吉林大学学报(工学版), 2010, 40(02): 427 -0430 .
[5] LIU Jing-bo, WANG Fei, WANG Cui-na, LIU Jun, WANG Zuo-zhao, WANG Er-lei, ZHANG Yan, LIN Song-yi. Optimization of preparation for anticoagulant peptide from egg white powder by Alcalase[J]. 吉林大学学报(工学版), 2012, 42(01): 250 -255 .
[6] LI Fei-long, LIN Yong-gang, LI Wei, LIU Hong-wei, CUI Bao-ling. Energy hydraulic transmission system of wind turbine[J]. 吉林大学学报(工学版), 2014, 44(6): 1664 -1668 .
[7] ZHENG Xiao-yi, SUN Da-qian, LI Xin, DU Gui-gang, XIN Wei-da, REN Zhen-an. Microstructure and properties of cladded Al-Nb layers reinforced by NbAl3[J]. Journal of Jilin University(Engineering and Technology Edition), 2018, 48(5): 1531 -1536 .
[8] WANG Li-min,LIU Yang,SUN Ming-hui,LI Mei-hui. Ensemble of unrestricted K-dependence Bayesian classifiers based on Markov blanket[J]. Journal of Jilin University(Engineering and Technology Edition), 2018, 48(6): 1851 -1858 .
[9] Yin⁃juan FU,Yong LI,Li⁃qin XU,Kun⁃hui ZHANG. Design and analysis of NLFM⁃Costas RF stealth radar signal[J]. Journal of Jilin University(Engineering and Technology Edition), 2019, 49(3): 994 -999 .
[10] TIAN Yan-tao, WANG Xiao-yu, HU Lei-lei, LIAN Yu-feng, ZHAO Yun, YIN Cheng. Active collision avoidance algorithm in electric vehicle lateral lane change[J]. 吉林大学学报(工学版), 2016, 46(5): 1587 -1594 .