摘要
高斯平滑滤波方法具有优良的噪声平滑性能和边缘保留能力,但运算量相对较大,限制了其在实时图像处理系统中的应用。本文基于高斯平滑掩膜的可分解性,提出了一种单次遍历实现两次卷积的高斯平滑滤波DSP优化方法。首先,依次打包读取4×8图像区域作为基本运算单元,有效降低对数据的重复访问;其次,在基本运算单元内,利用内联函数并行计算横向模板的一次卷积;然后,重组并复用横向模板卷积单元直接进行纵向模板的二次卷积。最后,以基本运算单元为单位遍历处理图像,计算平滑滤波结果。实验表明,利用TMS320C6455定点DSP对一幅320×240×8bit图像进行5×5高斯模板滤波耗时0.187ms,是优化前滤波耗时的1/35,具有较大的工程应用价值。
Gaussian smoothing filtering has a good performance in averaging the noise and preserving the edge. However,the large amount of calculation limits its application in real- time image processing system. Consequently,in view of the decomposability of the Gaussian smoothing mask,an optimized Gaussian smoothing filtering method which achieves successive convolution within single traversal is proposed in this paper. Firstly,reading 4 × 8 image area is as a basic operation unit to reduce data access. Secondly,lateral convolution is parallelly computed by using the inline function,to longitudinal convolution is calculated by recomposing and reusing lateral convolution results. Finally,the image with basic operation unit is traversed,smoothing filtering results are calculated. The experimental results show that the optimized code execution time is improved more than 35 times compared to the original C code when a 320 × 240 × 8bit image is smoothed based on TMS320C6455. The proposed method has great value in engineering application.
出处
《激光与红外》
CAS
CSCD
北大核心
2013年第12期1411-1415,共5页
Laser & Infrared
基金
部委级预研项目(No.51301030404-1)资助