• No results found

2D Gaussian Filter for Image Processing Application on FPGA

N/A
N/A
Protected

Academic year: 2020

Share "2D Gaussian Filter for Image Processing Application on FPGA"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

2D Gaussian Filter for Image Processing

Application on FPGA

Tarun Tyagi Vishal Mishra

M. Tech. Student Assistant Professor

Department of Electronics Engineering Department of Electronics Engineering Ideal Institute of Technology, Ghaziabad Ideal Institute of Technology, Ghaziabad

Abstract

This paper presents implementation of 2D Gaussian filter for image processing. The Gaussian filter is a 2D convolution operator which is used to smooth images and remove noise. The software results are carried out on MATLAB R 2013b while hardware implementation has been written in Verilog HDL. The significance of this filter is realized when it was implemented on FPGA kit. The unit is area and delay optimized on hardware kit.

Keywords: Gaussian Filter, FPGA, Image Enhancement, Filtering

________________________________________________________________________________________________________

I. INTRODUCTION

Nowadays, the concepts of digital image processing are being applied in different fields such as medicine, astronomy, geography, industry, etc. These fields often require results in real-time, and efficiency in the implementation of digital image processing is imperative. In this paper, the authors present the state-of-the-art research on the subject and propose a methodology for implementation of a 2D Gaussian Filter on an FPGA.

II. CONVENTIONAL 2D GAUSSIAN FILTER IMPLEMENTATION

A gray scale image is represented by a matrix of pixels with values ranging from 0 to 255. In this design we are using a 256 x 256 image for gaussian filtering. For storing image of 256 x 256 size in Block RAM (BRAM) of FPGA, it requires the image to be converted into a vector of 65536 elements. The input to BRAM should be of the format ‘ .coe ’ file. The following are the steps followed for executing the design.

1) Our base image will be lena_256.jpg. Using Matlab, we add gaussian noise to image. The code can be found in adding noise. m. The output image is lena_noise.jpg

2) Second step is convert image to text containing 65536 elements. The code can be found in image2text.m. Input file lena_noise.jpg

Output file is lena_gauss256.txt

3) The convert .txt file to. coe file manually. Output file is lena_gauss256.coe 4) Load the lena_gauss256.coe file to BRAM memory using Xilinx Design Suite 5) Here we start the verilog coding Quantized Gaussian kernal =

We will first load the image to img register. Then we do image processing, more precisely Gaussian filtering of image and store the result in img_gauss register. While simulating using Isim, A text file named img_gauss_filter.txt will be generated containing the coefficients of filtered image.

The text file can be converted to image by Matlab coding. Use gaussfilter.m file. Gaussian filter will smoothen the image, but it cannot remove the noise.

III. MODIFIED 2D GAUSSIAN FILTER IMPLEMENTATION

The difference is in step 5.

Quantized Gaussian kernal = 1/16 * [0 11 0] Horizontal Quantized Gaussian kernal2 = 1/16 * [0 11 0 ] Vertical

(2)

Here we use separate gaussian mask for horizontal and vertical arithmetic operations. First we apply horizontal gaussian mask and then vertical gaussian mask. While simulating using Isim, A text file named img_gauss_filter_modified.txt will be generated containing the coefficients of filtered image.

IV. FPGA IMPLEMENTATION

 For NxN size Guassian filter

 Base design requires N2 mutliplications and N2 - 1 Additions per pixel  Modified Design requires 2N mutliplications and 2N - 2 additions per pixel  Thus the hardware area required for computation is reduced.

V. DEVICE UTILIZATION

Conventional Design

Fig. 2: Device Utilization for Conventional Design Modified Design

(3)

VI. RTL SCHEMATICS BASE DESIGN

Fig. 4: RTL Schematic for Conventional Design Modified Design

Fig. 5: RTL Schematic for Modified Design

VII. SIMULATION RESULTS

Base Design

Fig. 6: Simulations for Base Design

(4)

Modified Design

Fig. 7: Simulations for Modified Design

g1-g3 are gaussian kernel coefficients, p1-p3 are image pixels. When check_ok becomes 1, the execution is completed and img_gauss_filter_modified.txt file is generated.

VIII. RESULTS

Fig. 8(a): Original Image Fig. 8 (b): Image with Gaussian noise

Image after Gaussian Filtering

(5)

IX. CONCLUSION

The algorithm was modified and applied on Lena image to prove its worth. The FPGA implementation of the 2D Gaussian filter proves its vitality for the image processing i.e. image smoothing. The algorithm can be further modified and tried and several images to make it universal.

REFERENCES

[1] D. AIghurair and S. S. AI-Rawi, "Design of Sobel operator using Field Programmable Gate Arrays," in 2013 The International Conference on Technological Advances in Electrical, Electronics and Computer Engineering (TAEECE). IEEE, May 2013, pp. 589-594. [Online]. Available:

[2] http://ieeexplore.ieee.orgflpdocs/epic03/ wrapper.htm?amumber=6557341

[3] V. Sriram and D. Kearney, "A FPGA Implementation of Variable Kernel Convolution," in Eighth International Conference on Parallel and Distributed Computing, Applications and Technologies (PDCAT 2007). University of South Australia: IEEE, Dec. 2007, pp. 105-110. [Online]. Available:

[4] http://ieeexplore. ieee.org/xpls/abs_aU.jsp?amumber=4420 148

[5] Z. Guo, W. Xu, and Z. Chai, "Image Edge Detection Based on FPGA," in 2010 Ninth International Symposium on Distributed Computing and Applications to Business, Engineering and Science. IEEE, Aug. 2010, pp. 169-171. [Online]. Available: http://ieeexplore.ieee.org/ Ipdocs/epic03/wrapper.htm?amumber=557240 1

[6] K. Ramana Reddy, "Implementation of pipelined sobel edge detection algorithm on FPGA for High speed applications;' in 2013 International Conference on Emerging Trends in Communication, Control, Signal Processing and Computing Applications (C2SPCA). IEEE, Oct. 2013, pp. 1-5. [Online], Available: [7] http://ieeexplore.ieee.orgllpdocs/epic03/wrapper.htm?amumber=6749364

[8] S. Khorbotly and F. Hassan, "A modified approximation of 2D Gaussian smoothing filters for fixed-point platforms," 2011 IEEE 43rd Southeastern Symposium on System Theory, pp. 151-159, Mar. 2011. [Online]. Available: http://ieeexplore.ieee.orgflpdocs/epic03/ wrapper.htm?amumber=5753797 [9] R. E. W. Rafael C. Gonzalez, Digital Image Processing using MATLAB, 2009, vol. 24, no. 11.

[10] D. G. Bailey, Design for Embedded Image Processing on FPGAs, 2011.

Figure

Fig. 2: Device Utilization for Conventional Design Modified Design
Fig. 4: RTL Schematic for Conventional Design Modified Design
Fig. 7: Simulations for Modified Design

References

Related documents

Software Developement Embeyond Technologies Private Limited Software Developement EMC Computer Systems India Software Developement EMC Data Storage Solutions Systems India

You are being invited to participate in a research study conducted by Katie Trautman, a graduate student in the Department of International and Multicultural Education at

Pel que fa als efectes sobre el món esportiu, Internet ha estat vital perquè és capaç de distribuir il·limitadament tot tipus de materials d'alta qualitat com fotografies o

On the other hand, when the player’s video queue size was reduced, the streaming via HLS protocol was first to show changes in quality in both lossy and

There- fore, to compare the levels of Il22 expression in mice with different Il22 alleles, it was necessary that each parental strain and its congenic carried similar viral load (

The gardens of Chambers later opened up a new area for picturesque landscape garden, the so-called Anglo- chinoiserie garden, where eastern (mainly Chinese)

The Service Management perspective and the assessment of value from both the customer and company perspective emphasises the importance of the relationship, we have briefly