计算机工程与应用 ›› 2020, Vol. 56 ›› Issue (6): 224-230.DOI: 10.3778/j.issn.1002-8331.1909-0064

• 工程与应用 • 上一篇    下一篇

插值前置的仿射变换FPGA实现方法

吴艺阳,樊凡,周怡,黄珺   

  1. 1.武汉大学 电子信息学院,武汉 430072
    2.武汉大学 宇航科学与技术研究院,武汉 430072
  • 出版日期:2020-03-15 发布日期:2020-03-13

FPGA Implementation of Affine Transformation Based on Pre-interpolation

WU Yiyang, FAN Fan, ZHOU Yi, HUANG Jun   

  1. 1.School of Electronic Information, Wuhan University, Wuhan 430072, China
    2.Institute of Aerospace Science and Technology, Wuhan University, Wuhan 430072, China
  • Online:2020-03-15 Published:2020-03-13

摘要:

目前实时视频的仿射变换FPGA实现方法主要基于反向映射原理。该方法在缓存一帧图像后采用四邻域像素的双线性插值得到仿射图像,但是四邻域像素的存储器读写需要FPGA提供四倍于原始图像流的传输带宽,导致FPGA无法同时兼顾存储资源消耗与数据吞吐率。针对该问题,提出了一种插值前置的仿射变换FPGA实现方法,该方法采用四角点映射方式将双线性插值计算提前到存储器缓存原始图像之前,避免双线性插值直接读写存储器所导致的数据带宽倍增问题。实验结果表明,与基于反向映射的仿射变换FPGA实现方法相比,该方法在保证高数据吞吐率的同时,降低了存储资源的消耗。

关键词: 仿射变换, 前置插值, 四角点映射, 现场可编程门阵列(FPGA)

Abstract:

The FPGA implementation of the affine transformation on the real-time video is mostly based on backward mapping, which derives the target image by bilinear interpolation of the four neighborhood pixels. However, the transmission of the four neighborhood pixels on the memory requires FPGA to provide the four times data bandwidth of the original image stream, resulting in the defects of high memory cost and low throughput. To solve this problem, the pre-interpolation based affine transformation is proposed in this paper. This method which adopts the four-corner mapping to construct the mapping function can perform bilinear interpolation before the image data flow is cached on the memory, so the four times data transmission bandwidthon the memory can be removed. Experiments on FPGA demonstrate that the proposed method has better overall performance in terms of throughput and memory cost compared to the affine transformation based on the backward mapping.

Key words: affine transformation, pre-interpolation, four-corner mapping, Field Programmable Gate Array(FPGA)