摘要
图像滤波算法广泛应用在机器学习、图像处理、图像识别等领域,在降低椒盐噪声、图像二值化、边缘识别和特征提取等方面发挥着重要作用。现有图像滤波算法虽然在OpenCV开源库中均有实现,但是在Android平台的性能表现与其他平台相比仍存在较大差距。随着嵌入式平台的高速发展,实际应用对嵌入式平台上滤波算法的性能要求越来越高。为此,从形态学滤波、盒式滤波、阈值滤波、压缩滤波、算术滤波等具有广泛应用场景的滤波算法入手,提出并实现针对Android平台设计、基于OpenGL ES的一系列高性能图像滤波算法。使用OpenGL ES计算着色器对算法进行并行加速,使用纹理对象进行访存优化,并在图像边界处理、图像数据类型和数据通信等方面进行深入优化,取得了较优的性能。将优化的图像滤波算法与开源OpenCV库中对应算法进行对比,实验结果表明,基于Android平台使用OpenGL ES接口的图像滤波算法整体性能明显优于OpenCV库中的相关算法,且图像规模越大计算优势越明显,性能最大提升为OpenCV库中对应算法的110.018倍。
Image filtering algorithms have wide applications in such fields as machine learning,image processing,and image recognition.They play an important role in reducing"salt and pepper"noise,image binarization,edge recognition,and feature extraction.Although common image filtering algorithms are implemented in the OpenCV open source library,a significant gap in performance exists compared with other platforms on the Android platform.With the rapid development of embedded platforms,the performance requirements for filtering algorithms on embedded platforms have become increasingly high in practical applications.Therefore,starting with filtering algorithms with wide application scenarios,such as morphological filtering,box filtering,threshold filtering,compression filtering,and arithmetic filtering,a series of high-performance image filtering algorithms designed for the Android platform based on OpenGL ES are developed and implemented.OpenGL ES calculation shaders are used to accelerate the algorithm in parallel,using texture objects for memory optimization,and in-depth optimization in image boundary processing,image data types,and data communication is conducted.This approach resulted in better performance.The optimized image filtering algorithm is compared with the corresponding algorithm in the open-source OpenCV library.The experimental results show that the overall performance of the image filtering algorithm based on the Android platform using the OpenGL ES interface is significantly better than the performances of the relevant algorithms in the OpenCV library.The larger the image size,the more obvious the computational advantage.The maximum performance improvement is 110.018 times that of the corresponding algorithm in the OpenCV library.
作者
常文斌
牟明任
贾海鹏
张云泉
张思佳
CHANG Wenbin;MU Mingren;JIA Haipeng;ZHANG Yunquan;ZHANG Sijia(College of Information Engineering,Dalian Ocean University,Dalian 116023,Liaoning,China;State Key Laborary of Processors,Institute of Computing Technology,Chinese Academy of Sciences,Beijing 100190,China)
出处
《计算机工程》
CAS
CSCD
北大核心
2023年第11期257-266,共10页
Computer Engineering
基金
国家自然科学基金(61972376,62072431,62032023)。