• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2022, Vol. 44 ›› Issue (10): 1738-1746.

• 高性能计算 • 上一篇    下一篇

基于ARM架构的中值滤波算法优化

牟明任1,2,贾海鹏2,张云泉2,邓明森1,曲国远3,魏大洲3,张广婷2   

  1. (1.贵州财经大学信息学院,贵州 贵阳 550025;
    2.中国科学院计算技术研究所计算机体系结构国家重点实验室,北京 100190;
    3.中国航空无线电电子研究所,上海 200241)
  • 收稿日期:2022-04-21 修回日期:2022-05-25 接受日期:2022-10-25 出版日期:2022-10-25 发布日期:2022-10-28
  • 基金资助:
    国家重点研发计划(2017YFB0202105);国家自然科学基金(61972376);北京市自然科学基金(L182053)

Optimization of median filtering algorithm based on ARM architecture

MU Ming-ren1,2,JIA Hai-peng2,ZHANG Yun-quan2,DENG Ming-sen1,QU Guo-yuan3,WEI Da-zhou3,ZHANG Guang-ting2   

  1. (1.School of Information,Guizhou University of Finance and Economics,Guiyang 550025;
    2.State Key Laboratory of Computer Architecture,Institute of Computing Technology,
    Chinese Academy of Sciences,Beijing 100190;
    3.China Aeronautical Radio Electronics Research Institute,Shanghai 200241,China)
  • Received:2022-04-21 Revised:2022-05-25 Accepted:2022-10-25 Online:2022-10-25 Published:2022-10-28

摘要: 中值滤波是图像处理中降低椒盐噪声的一种有效手段,其核心是计算当前滤波窗口内所有像素的中值。中值滤波具有稳定性,当一幅图像的像素点被改变时,即使改变的值很大,也不会影响中值滤波的计算结果。滤波窗口遍历整幅图像后,就完成了整幅图像的中值滤波计算。中值滤波算法的关键是定义最优中值算法,以在最短的时间内获取中值。对此,提出并实现了自适应中值算法,能够根据滤波窗口半径和数据类型,自动选择性能最佳的中值算法,并使用ARM NEON指令集进行优化加速。实验结果表明,提出的自适应中值滤波算法较OpenCV的中值滤波算法性能有显著提升,平均性能提升了20%。

关键词: 中值滤波, 中值算法, ARM指令集

Abstract: Median filtering is an effective method to reduce salt and pepper noise in image processing. Its core is to calculate the median of all pixels in the current filtering window. Median filtering is stable. When the pixels of an image are changed, the calculation results of median filtering will not be affected even if the changed value is large. After the filtering window traverses the whole image, the median filtering calculation of the whole image is completed. The key of the median filtering algorithm is to define the optimal median algorithm, which can obtain the median in the shortest time. In this regard, an adaptive median algorithm is proposed and implemented, which can automatically select the median algorithm with the best performance according to the filtering window radius and data type, and use ARM NEON instruction set for optimization and acceleration. Experimental results show that the proposed adaptive median filtering algorithm significantly outperforms OpenCV, and the  average performance is improved by 20%.  

Key words: median filtering, median algorithm, ARM instruction set