Comparative Analysis of Different Optimization Technique For Sobel Edge Detection On FPGA
Comparative Analysis of Different Optimization Technique For Sobel Edge Detection On FPGA
Abstract: In this paper we preset implementation of an optimized In this paper we discuss an optimized Sobel operator, it needs
Sobel edge detection algorithm on FPGA. The optimized gradient less FPGA resources and also reduces delay compared to
based edge detection method reduces the area up to 48.76% reference [3] and reference [4].
compared to existing gradient calculation unit, and also reduces
propagation delay up to 51% compared to the area optimized
architecture. The entire project is implemented on Spatran-3E
II. SOBEL EDGE DETECTION ALGORITHM
FPGA board. VGA interface is used to display the edge detection
image on the monitor. In edge detection the Sobel operator is used commonly [1].
The Sobel operator is a classic first order edge detection
Keywords : Sobel edge detector, FPGA, Block Memory. operator, computing an approximation of the gradient of the
image intensity function. Any approximation used for first
I. INTRODUCTION derivative must satisfy the following conditions:[1]
The edge detection is a terminology in the Image 1. It must be zero in the area of constant intensity.
processing particularly in the area of feature extraction to refer 2. It must be nonzero at the onset of intensity step or
to algorithm which aims at identifying points in a digital ramp.
image at which the image brightness changes sharply [1]. 3. It must be nonzero at points along an intensity ramp.
There are some well-known methods for edge detection such First derivative are implemented using magnitude of gradient.
as Sobel, Canny, Prewitt and Robert algorithms which are For an image f (x,y) the gradient of image f at (x,y) is defined
different in terms of performance on hardware, speed and as [5]
simplicity [1]. The Sobel operator is mainly used for hardware f = grad (f) = = (1)
implementation due to efficiency and simple mathematical
model that make it easy for real-time edge detection Where Gx is the gradient in the horizontal direction, Gy is the
application [2]. The edge detection is mainly applicable in gradient in the vertical direction.
case of data transmission; where the edge detected data reduce The two gradient are calculated using the partial derivative of
the amount of data to be transmitted. Edge detection finds its image function f with respect to x and y at every pixel location
application in Computer vision applications, boundary of the image. Digital approximations of these partial
detection, motion detection, segmentation, texture analysis derivatives can be expressed as [1].
and object identification [2]. Gx = ߲f/߲x = [f(x + 1, y) – f(x – 1, y)]/2 (2)
Gy = ߲f/߲y = [f(x, y + 1) – f(x, y – 1)]/2 (3)
The sobel edge detector is very popular than simple gradient The Gradient magnitude is given by
operators, because its less complex and easy for computations G = |Gx| + |Gy| (4)
[2]. The accuracy of the Sobel for edge detection is relatively Here G represents the value of rate of change in the direction
less because it uses only two masks which detect the edges in of gradient vector.
horizontal and vertical directions only. The accuracy can be
enhanced by using the Soble operator which uses a larger set
of masks [1,2]. III. HARDWARE IMPLEMENTATION
Authorized licensed use limited to: VIT University. Downloaded on November 08,2024 at 14:58:58 UTC from IEEE Xplore. Restrictions apply.
operator, and generation data and gradient are the middle
The above figure 1 shows the entire block diagram of this signals. The function and structure of each module explained
project. The input image is gray scale image of size 128 x128 in the following sections.
each of 8 bits. The Coefficient (coe) file of the input image is
generated using MATLAB. The coe file is stored in Blocki. i. Pixel generation module
Rom which is then processed using the Sobel edge detection
algorithm. The resulting edge detected image is displayed on
monitor using VGA interfacing.
A. Block Memory
Spatran 3E FPGA consist of special Block memories. These
Block memories help in speeding up the memory operations.
Here single port Block ROM used which can support up to
360 Kbits. The width and depth of the design is user defined.
The schematic for the block memory is shown in fig 2.
The above architecture is divided into three modules Using the four masks mentioned above the gradient
i. 3x3 pixel generation module calculation is done using the following equations [3]
ii. Sobel enhancement operator module Gx = (P3 – P1) +2(P6-P4) + (P9-P7) (5)
a. Existing gradient calculation unit [3]. Gy = (P7 – P1) +2(P8-P2) + (P9-P3) (6)
b. Area optimized gradient calculation unit [4] Gdr = (P8 – P2) +2(P9-P1) + (P6-P4) (7)
c. Proposed gradient calculation unit Gdl = (P2 – P8) +2(P3-P7) + (P6-P8) (8)
iii. Binary Segmentation module Gradient can be found by using the equation
In this architecture, Data input are the pixel values of the Gray G = |Gx| + |Gy| + |Gdr| + |Gdl| (9)
Scale Image, Result is the output of the edge detection
Authorized licensed use limited to: VIT University. Downloaded on November 08,2024 at 14:58:58 UTC from IEEE Xplore. Restrictions apply.
a. Existing Gradient Calculation Unit c. Proposed gradient calculation unit
In the Sobel enhancement operator for calculating the
gradient for all the direction, it increases the propagation
delay [3]. The pipelined gradient calculation unit is used to
reduce the delay. It uses multiple processing elements in
parallel to compute gradient along each direction. But it
requires more registers to store the intermediate values and
it needs more FPGA resources. Existing gradient
calculation unit is shown the figure 5.
C. VGA Interfacing
VGA means Video Graphic Array. It is a video display
standard. It gives a simple method to connect a monitor with
the system for displaying information or images. VGA has
been widely used as a standard display interface. There is
Fig 6: Area optimized gradient calculation unit [4] more and more need for displaying the result of the process in
real time because of the fast development of embedded system,
especially the development of high speed image processing
algorithm. The screen for a standard VGA monitor contains
640 columns by 480 rows of pixels. An image is displayed on
the screen by turning on and off individually pixels. The
combinations of many such pixels generate an image.
Authorized licensed use limited to: VIT University. Downloaded on November 08,2024 at 14:58:58 UTC from IEEE Xplore. Restrictions apply.
Figure 8: VGA Monitor Scan Proces
The VGA monitor control circuit uses 5 signals V-sync, H-
sync, Red_out, Green_out and Blue_out as shown in the Figure 11: Simulation result for proposed gradient calculation
below figure 9. unit.
Synthesis report for the existing [3], area optimized [4] and
proposed gradient architecture is compared. The table 2 shows
that the area is reduced 40% and also reduced propagation
delay compared to standard architecture. Because proposed
architecture requires only 2 cycles to compute gradient for all
the direction compared to the existing architecture.
Authorized licensed use limited to: VIT University. Downloaded on November 08,2024 at 14:58:58 UTC from IEEE Xplore. Restrictions apply.
This design of Sobel edge detection algorithm is also v. CONCLUSION
simulated and tested on the cadence tool. The below table 3 This paper presents implementation of compromised Sobel
shows the synthesis report for area, power and delay for three edge detection algorithm is designed, simulated and tested.
architectures. The advantage using our proposed architecture The high level implementation of the project is done using
reduced area up to 15.78%, which reduces the power by an MATLAB. In order to improve the speed and reducing the
average of 10.02% compared to existing architecture [3], and FPGA resource usage the Gradient calculation block is
it also reduces the delay compared to the area optimized modified using proposed architecture. The hardware is
architecture [4]. realized on Spartan 3E FPGA kit. The VGA monitor
controller is developed to interface the FPGA with the
monitor to display the edge detected output on the monitor.
The timing reports of both the existing, area optimized [6] and
proposed architecture are compared. The propagation delay is
reduced up to 51% and also area is reduced up to 40%
compared to the existing architectures [1] [2].
REFERENCES
C D
E F
Figure 14: Simulation Result
Authorized licensed use limited to: VIT University. Downloaded on November 08,2024 at 14:58:58 UTC from IEEE Xplore. Restrictions apply.