基于FPGA的模板滤波IP核的设计与实现

深圳大学光电工程学院,广东深圳51860

图像处理; 卷积运算; 现场可编程门阵列; 模板滤波; IP核; 卷积结构

Design and implementation of template filtering IP core based on FPGA
LI Dong, AO Sheng, TIAN Jindong, and TIAN Yong

College of Optoelectronic Engineering, Shenzhen University, Shenzhen 51860, Guangdong Province, P.R.China

image processing; convolution operation; field programmable gate array(FPGA); template filtering; intellectual property(IP)core; convolution structure

DOI: 10.3724/SP.J.1249.2018.06622

备注

在数字图像处理过程中,二维模板卷积是一种重要的操作.提出一种基于现场可编程门阵列(field programmable gate array, FPGA)的可变模板滤波IP(intellectual property)核的设计方法,通过参数化的循环例化移位寄存器构建可灵活调整窗口大小的缓存结构,采用只读寄存器(read-only memory, ROM)载入模板滤波系数,并利用加法树模块实现快速累加.相比传统组合扩展方法,本设计充分节约了硬件资源,简化了电路设计,提供了便捷的调用接口,只需修改参数便可灵活调整卷积结构,适用于任意窗口大小、任意模板系数、任意图像大小和数据位宽的卷积运算,具有良好的通用性和可维护性.

2D template convolution is an important operation in the field of digital image processing. This paper proposes a new method to design the variable template filtering intellectual property(IP)core based on the field programmable gate array(FPGA). Our method can flexibly adjust the window size with the parameterized loop instantiation shift register construction. The cache structure uses read-only memory(ROM)to load the template filter coefficients and uses the addition tree module to achieve the fast accumulation. Compared with the traditional combination expansion method, the developed method can fully save the hardware resources, simplify the circuit design, provide a convenient call interface, and flexibly adjust the convolution structure. It is also suitable for any window size, arbitrary template coefficients, convolution operation of arbitrary image size and data bit width, and has the good versatility and maintainability.

·