﻿ 基于Zedboard的WLI图像缩放算法的硬件设计 Hardware Design of WLI Image-Zooming Algorithm Based on Zedboard

Computer Science and Application
Vol.05 No.06(2015), Article ID:15485,8 pages
10.12677/CSA.2015.56025

Hardware Design of WLI Image-Zooming Algorithm Based on Zedboard

Shiyang Xu, Hang Dong, Hui Li

Department of Microelectronics and Solid-State Electronics, University of Electronic Science and Technology of China, Chengdu Sichuan

Email: 791608192@qq.com

Received: Jun. 4th, 2015; accepted: Jun. 22nd, 2015; published: Jun. 25th, 2015

ABSTRACT

A novel zoom algorithm is researched and further realized by a FPGA board. The algorithm is of low complexity, low hardware requirements, and wonderful zoom result thanks to even-odd decomposition method. First, function of the algorithm was verified by MATLAB. Second, zoom results of pictures were evaluated using PSNR, time consuming, edge fuzzy grade, and impulse noise. Compared to the conventional algorithm in the time domain, the even-odd decomposition method has advantages on zoom quality and computational efficiency. Based on Zedboard, we wrote C program of WLI image zoom algorithm and used high level synthesis tool Vivado HLS to generate the IP from the program. Then, a software and hardware co-verification system was constructed including modules such as ARM processor, VGA controller. Finally, hardware design of the zoom algorithm using even-odd decomposition method was proved correct by experiments.

Keywords:Parity Decomposition, WLI Algorithm, High Level Synthesis, Software and Hardware Co-Verification System

Email: 791608192@qq.com

1. 引言

2. 图像插值算法及MATLAB仿真

2.1. 传统插值算法 [2]

2.2. WLI算法

WLI算法应用奇偶分解的思想，将一维缩放中相关的四个点进行奇偶分解(奇部和偶部的相关点值分解后的关系示例见图1)。从定义上分析，奇部向量在频域图像数据处理中是一个高通滤波结构，相比于偶部向量，它具有更强的噪声。而噪声和高频信号对该部分的影响往往会掩盖该部分对正确缩放的像素点取值的贡献，所以为尽量避免奇部向量中携带的噪声等参量对缩放质量造成损害，对它进行简单的线性化操作，得出公式(1)的处理方案。

(1)

(2)

2.3. 算法的MATLAB仿真及评估

PSNR [5] 也叫峰值信噪比，它是最普遍、最广泛使用的评鉴画质的客观测量方法，意指到达噪音比率的顶点信号，是衡量经过处理后的影像品质的客观方法，用MATLAB实现的计算公式如(3)所示。

(3)

(a) (b)

Figure 1. The module of the relative points for even-odd decomposition [1]

Figure 2. The linear module of even part of WLI method [1]

Figure 3. The basic data transmission structure of WLI method [1]

Figure 4. The impulse noise of magnified two times the pictures in different kind of methods

Table 1. The edge fuzzy grade of magnified two times the pictures in different kind of methods

3. 硬件系统平台的搭建

3.1. ZEDBOARD的控制输入IP

3.2. WLI算法IP

3.2.1. Axi4接口

Axi4 [8] 是由Xilinx和ARM合作提出的便于全可编程器件内部ARM和FPGA之间数据的高速通信的总线标准。Zedboard内部使用Axi4，可细分为Axi_lite、Axi4、Axi_stream三大类，包含地址、数据和反馈通道。能实现ARM和FPGA内部的高速并行数据通信，并支持DMA (direct memory access)通信。

3.2.2. 符合Axi4接口的WLI算法IP

Vivado HLS是Xilinx针对其全可编程器件而推出的高级综合组件，该软件可以实现对C语言编写的程序的直接硬件化，并能很好的综合出符合Axi标准的IP [9] - [12] 。本文的设计采用这种设计方法，借助OpenCV的MAT的相关内容、要求，编写可综合算法程序，图7是WLI算法的实现流程。

Figure 5. The structure of hardware system with zoom method

Figure 6. The structure of import controlling IP

Figure 7. WLI method flow

3.3. 硬件系统搭建

4. 软硬协同验证实验

4.1. 软件原理

4.2. 软硬件协同验证

Figure 8. The structure of hardware system

Figure 9. Software flow diagram

Figure 10. The system of zoom picture in comparison

Figure 11. The time consuming result of image scaling algorithms in different times

5. 结论

Hardware Design of WLI Image-Zooming Algorithm Based on Zedboard. 计算机科学与应用,06,195-203. doi: 10.12677/CSA.2015.56025

1. 1. Choi, B.-D. and Yoo, H. (2009) Design of piecewise weighted linear interpolation based on even-odd decomposition and its application to image resizing. IEEE Transactions on Consumer Electronics, 55, 2280-2286.

2. 2. 刘婧 (2009) 图像缩放算法的研究与FPGA设计. 硕士论文, 上海大学, 上海.

3. 3. 李秀英, 袁红 (2012) 几种图像缩放算法的研究. 现代电子技术, 35, 48-51.

4. 4. Wang, J. (2011) MATLAB三种程序耗时算法. http://wenku.baidu.com/view/4f125446336c1eb91a375d60.html

5. 5. 心海 (2013) PSNR定义与计算. http://blog.sina.com.cn/s/blog_7e27bd1a0101alq5.html

6. 6. Li, X. (2002) Blind image quality assessment. IEEE ICIP, 1, 449-452.

7. 7. Xilinx (2014) Zynq-7000 all programmable SoC. Xilinx数据手册.

8. 8. Xilinx (2011) Xilinx, AXI reference guide UG761 (v13.1) March 7. Xilinx数据手册.

9. 9. 马建国, 孟宪元 (2011) FPGA现代数字系统设计. 清华大学出版社, 北京.

10. 10. 仆居 (2013) AXI-Stream接口开发详细流程. http://blog.csdn.net/kkk584520/article/details/9290069

11. 11. 何宾 (2011) 基于AX14的可编程SOC系统设计. 清华大学出版社, 北京.

12. 12. 何宾 (2011) Xilinx all programmable Zynq-7000 SOC设计指南. 清华大学出版社, 北京.

13. 13. 开源硬件社区 (2009) VGA驱动及实现. www.oshbbs.com

14. 14. Cuter (2013) 如何在SDK中计算某段程序的执行时间. http://blog.chinaaet.com/detail/31789