SlideShare a Scribd company logo
IOSR Journal of VLSI and Signal Processing (IOSR-JVSP)
Volume 2, Issue 2 (Mar. – Apr. 2013), PP 06-09
e-ISSN: 2319 – 4200, p-ISSN No. : 2319 – 4197
www.iosrjournals.org
www.iosrjournals.org 5 | Page
Image Smoothening Gradient Magnitude and Hystersis
Calculation for Canny Edge Detector Using FPGA for Area
Optimization
Chandrashekar N.S.1
, Dr. K.R. Nataraj 2
1,
Department of ECE, Don Bosco Institute of Technology, Bangalore, Karnataka, India.
2,
Department of ECE, SJB Institute of Technology, Bangalore, Karnataka, India.
Abstract: In this paper, image smoothening, gradient magnitude, hystersis used in Canny edge detection
algorithm is presented. The new algorithm used has a low-complexity 8-bin non-uniform gradient magnitude
histogram to compute block-based hysteresis thresholds that are used by the Canny edge detector. This also
achieves less memory requirements, decreased latency and increased throughput with no loss in edge detection.
Furthermore, the hardware architecture of the proposed algorithm is presented in this paper and the
architecture is synthesized on the Xilinx Virtex 5 FPGA. The design development is done in VHDL and
simulated results are obtained using modelsim 6.3 with Xilinx 12.2.
Keywords: - Canny Edge detector, Distributed Processing, FPGA, Non-uniform quantization.
I. Introduction
Edge detection, as a basic operation in image processing, has been researched extensively. A lot of
edge detection algorithms, such as Robert detector, Prewitt detector, Kirsch detector, Gauss-Laplace detector
and canny detector have been proposed. Among these algorithms, canny algorithm has been used widely in the
field of image processing because of its good performance [1]. The edge detection process serves to simplify the
analysis of images by drastically reducing the amount of data to be processed, while at the same time preserving
useful structural information about object boundaries. There is certainly a great deal of diversity in the
applications of edge detection, but it is felt that many applications share a common set of requirements [2]. The
Canny edge detector is predominantly used in many real-world applications due to its ability to extract
significant edges with good detection and good localization performance. Unfortunately, the canny edge
detection algorithm contains extensive pre-processing and post-processing steps and is more computationally
complex than other edge detection algorithms. Furthermore, it performs hysteresis thresholding which requires
computing high and low thresholds based on the entire image statistics. This places heavy requirements on
memory and results in large latency hindering real-time implementation of the Canny edge detection algorithm
[3]. In [1, 2], a recursively implementable edge detection algorithm is suggested and optimized using retiming
techniques. But its performance is quite poor in images with low SNRs. The approach of [5, 6] combines the
derivative and smoothening operations of the Canny algorithm into a single mask to reduce computations. The
pipelined implementation is a block-based approach with a block-size of 2 rows of pixels. It overcomes the
dependencies between the blocks by fixing high and low thresholds to a constant value. In both of these
approaches gradient thresholds are not adapted to the image characteristics, and their performance is not
guaranteed for blurred images and images with low SNRs [3].
In [7], an improvised approach is done for image edge detection and its efficiency with a set of images.
Results confirm that the DOW-canny edge detector, besides being insensitive to noise, is able to fabricate
superior and accurate edges in regions of fine graining, geometrical figures and alpha-numerics as compared to
the current edge detection techniques. The original Canny algorithm computes the higher and lower thresholds
for edge detection based on the entire image statistics, which prevents the processing of blocks independent of
each other. In order to reduce memory requirements, decrease latency and increase throughput, a distributed
canny edge detection algorithm is proposed in [4]. The hysteresis threshold calculation is a key element that
greatly affects the edge detection results. However, the original canny algorithm computes the high and low
thresholds for edge detection based on the entire image statistics, which prevents the processing of individual
blocks independently. Quality control has been performed in hard work conditions and made easier using
automated visual systems quality control. It performs faults detection and final quality control. Edges and faults
on ceramic tiles were detected using Canny edge detector. Problem of defining hysteresis thresholds was
resolved with a histogram subtraction method [5]. In this paper it is presented the method for faults detection
based on edge detection techniques. A method based on non-uniform and coarse quantization of the gradient
magnitude histogram was proposed. In addition, the proposed algorithm is mapped onto reconfigurable
Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using
www.iosrjournals.org 6 | Page
hardware architecture. The threshold is calculated using the data of the histogram of gradient magnitude rather
than is set manually in a failure-and-try fashion and can give quite good edge detection results without the
intervening of an operator.
This paper is organized as follows. Section 2 gives a Brief analysis of the Canny edge detector
algorithm. Section 3 presents the implementation of proposed Canny edge detection algorithm. Simulation
results are presented in Section 4. A conclusion is given in Section 5.
II. ANALYSIS OF CANNY EDGE DETECTOR
The block diagram of the Canny edge detection algorithm is demonstrated in “Fig.” 1. The original
canny algorithm [2] consists of the following steps:
 Smoothing the input image by Gaussian mask. The output smoothed image is denoted as I(x, y).
 Calculating the horizontal gradient Gx(x, y) and vertical gradient Gy (x, y) at each pixel location by
convolving the image I(x, y) with partial derivatives of a 2D Gaussian function.
 Computing the gradient magnitude G(x, y) and direction θG (x, y) at each pixel location.
(1)
θG = arctan (Gy/Gx) (2)
 Applying non-maximum suppression (NMS) to thin Edges
 Computing the hysteresis high and low thresholds based on the histogram of the magnitudes of the
gradients of the entire image.
 Performing hysteresis thresholding to determine the edge map.
Low Pass
Filter
Horizantal
and Vertical
Gradients
Gradient
Magnitude
and
Direction
Non
Maximal
Suppressi
on (NMS)
Compute
the high
and low
thresholds
Hysteresis
Thresholdi
ng
Input
Image
Edge
Map
Fig 1.Block diagram of the Canny edge detection algorithm.
II. IMPLEMENTATION OF THE PROPOSED CANNY EDGE DETECTOR
In this section, the hardware implementation of proposed canny edge detection algorithm on the Xilinx
FPGA is described.
In the proposed architecture, it consists of the following 5 units in “Fig.” 2.
 Smoothening unit using Gaussian filter.
 Vertical and horizontal gradient Magnitude calculation unit.
 Directional non-maximum suppression unit.
 High and low threshold Calculation unit.
 Thresholding with hysteresis unit.
PinG Pong
Buffer
Gaussian
Magnitude
Horizontal
and
Vertical
Gradient
Calculation
Directional
Non-
Maximal
Suppression
Calculation
Thresholds
Thresholding
With
Hysteresis
DATA
CE
Fig. 2: Block diagram of the compute engine.
Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using
www.iosrjournals.org 7 | Page
2.1 Image Smoothening:
The input image was smoothened using a 3×3 Gaussian mask. The Gaussian filter is separable and,
thus, the implementation of the 2-D convolution with the 3×3 Gaussian mask was achieved using row and
column 1- D convolutions.
2.2 Gradients and Gradient Magnitude Calculation:
Calculation of the vertical and horizontal gradients using convolution kernels was done in this stage.
The kernels vary in size from 3 × 3 to 9 × 9, depending on the sharpness of the image. The whole design was
pipelined, and thus the output was generated every clock cycle. This was an input to the magnitude calculation
unit which computes, at each pixel location, the gradient magnitude from the pixel’s horizontal and vertical
gradients.
2.3 Directional Non Maximum Suppression:
In order to access all the pixels’ gradient magnitudes in the 3 × 3 window at the same time, two FIFO
buffers were employed. The horizontal gradient Gx and the vertical gradient Gy control the selector which
delivers the gradient magnitude of neighbors along the direction of the gradient, into the arithmetic unit. This
arithmetic unit consisted of one divider, two multipliers and one adder, which were implemented using the
Xilinx Math Functions IP cores. The output of the arithmetic unit was compared with the gradient magnitude of
the center pixel, and the pixel that has no local maximum gradient magnitude was eliminated.
2.4 Calculation of the hysteresis thresholds:
Since the low and high thresholds were calculated based on the gradient histogram, the histogram of
the image was computed after it had undergone directional non-maximum suppression. As discussed in Section
2, an 8-step non-uniform quantizer was employed to obtain the discrete histogram for each processed block. The
block-based hysteresis thresholds (high threshold ThH and low threshold ThL) were computed.
2.5 Thresholding with hysteresis:
Since, the output of the non maximum suppression unit contains some spurious edges, the method of
thresholding with hysteresis was used. Two thresholds, high threshold ThH and low threshold ThL, which were
obtained from the threshold calculation unit, were employed. Let f(x, y) be the image obtained from the non
maximum suppression stage, f1(x, y) be the strong edge image and f2(x, y) be the weak edge image.
2 SIMULATION RESULTS AND ANALYSIS
Proposed system is implementation in FPGA using Device Virtex 5 XC5VTX240T and Package
FF1759. “Fig.” 3(a) shows design utilization summary of Image smoothening (thin blurring) and “Fig.” 3(b) and
“Fig.” 3(c) shows RTL top module schematic and simulation results of Non smoothening (thin blurring)
respectively.
Logic Utilization Used Available Utilization
Number of Slice Registers 8353 149760 5%
Numbers of Slice LUTs 19968 149760 13%
Number of fully used LUT-
FF pairs
3242 25079 12%
Number of bonded IOBs 22 680 3%
Number of
BUFG/BUFGCTRLs
3 32 9%
Fig.3 (a). Design Summary of Image smoothening (thin bluring) Unit
Fig.3 (b). RTL Top module Schematic of Image smoothening (thin bluring) Unit
Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using
www.iosrjournals.org 8 | Page
Fig. 3(c). Simulation Results of Image smoothening (thin bluring) Unit
“Fig.” 4(a) shows design utilization summary of Gradient phase Unit and “Fig.” 4 (b) and “Fig.”4(c) shows RTL
top module schematic and simulation results of Gradient phase Unit respectively.
Logic Utilization Used Available Utilization
Number of Slice Registers 11434 149760 7%
Numbers of Slice LUTs 24093 149760 16%
Number of fully used LUT-FF
pairs
5120 30407 16%
Number of bonded IOBs 26 680 3%
Number of BUFG/BUFGCTRLs 3 32 9%
Number of DSP48Es 2 96 2%
Fig.4 (a). Design Summary of Gradient phase Unit.
Fig.4 (b) RTL Top module Schematic of Gradient phase Unit
Fig. 4(c). Simulation Results of Gradient phase Unit
“Fig.” 5(a) shows design utilization summary of Hysteresis Unit and “Fig.” 5(b) and “Fig.” 5(c) shows RTL top
module schematic and simulation results of Hysteresis Unit respectively.
Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using
www.iosrjournals.org 9 | Page
Device Utilization Summary(estimated values)
Logic Utilization Used Available Utilization
Numbers of Slice LUTs 10 149760 0%
Number of fully used LUT-FF
pairs
0 10 0%
Number of bonded IOBs 36 680 5%
Number of BUFG/BUFGCTRLs 1 32 3%
Fig.5 (a). Design Summary of Hysteresis Unit.
Fig.5 (b) RTL Top module Schematic of Hysteresis Unit.
Fig.5(c).Simulation Results of Hysteresis Unit.
V. CONCLUSION
A new canny edge detector algorithm using FPGA implementation for Image smoothening and
gradient magnitude was proposed in this work. A novel non-uniform quantized histogram calculation method
was used in this work in order to reduce the computational cost of the hysteresis threshold selection. As a result,
the computational cost of the proposed algorithm was found to be very low compared to the original Canny edge
detection algorithm. The algorithm is mapped to onto a Xilinx Virtex-5 FPGA platform and tested using
ModelSim. It is capable of supporting fast real-time edge detection for images and videos with various spatial
and temporal resolutions including full-HD content.
REFERENCES
[1] L. Torres, M. Robert, E. Bourennane, and M. Paindavoine, “Implementation of a recursive real time edge detector using Retiming
techniques,” VLSI, Aug. 1995, pp.811 –816.
[2] J. Canny, “A computational approach to edge detection,”IEEE Trans. PAMI, vol. 8, no. 6, Nov. 1986, pp. 679 –698.
[3] Qian Xu, Chaitali Chakrabarti and Lina J. Karam,”A Distributed Canny Edge Detector and Its Implementation On FPGA”, Arizona
State University, Tempe, AZ. 2011.
[4] S. Varadarajan, C. Chakrabarti, L. J. Karam, and J. M.Bauza, “A Distributed psycho-visually motivated canny edge detector,” IEEE
ICASSP, Mar. 2010, pp. 822 –825,.
[5] Željko Hocenski, Suzana Vasilić, “Improved Canny Edge Detector in Ceramic Tiles Defect Detection”, Osijek, Croatia 6-10
Nov2006.
[6] W. He and K. Yuan, “An improved Canny edge detector and its Realization on FPGA,” WCICA, Jun. 2008, pp. 6561 –6564.
[7] Anand Gupta , Ravi Kumar Dalal,Rahul Gupta,Pulkit Wadhwa “DOW-Canny: An Improvised Version Of Canny Edge Detector”.
(ISPACS) December 2011, pp. 7-9.

More Related Content

PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PDF
IRJET- Image Feature Extraction using Hough Transformation Principle
PDF
AN ENHANCED BLOCK BASED EDGE DETECTION TECHNIQUE USING HYSTERESIS THRESHOLDING
PDF
Real Time Implementation of Ede Detection Technique for Angiogram Images on FPGA
PDF
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
PDF
PC-based Vision System for Operating Parameter Identification on a CNC Machine
PDF
Implementation of Object Tracking for Real Time Video
PDF
Unsupervised region of interest
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IRJET- Image Feature Extraction using Hough Transformation Principle
AN ENHANCED BLOCK BASED EDGE DETECTION TECHNIQUE USING HYSTERESIS THRESHOLDING
Real Time Implementation of Ede Detection Technique for Angiogram Images on FPGA
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
PC-based Vision System for Operating Parameter Identification on a CNC Machine
Implementation of Object Tracking for Real Time Video
Unsupervised region of interest

What's hot (20)

PDF
REGISTRATION TECHNOLOGIES and THEIR CLASSIFICATION IN AUGMENTED REALITY THE K...
PDF
V.KARTHIKEYAN PUBLISHED ARTICLE 1
PDF
PARALLEL GENERATION OF IMAGE LAYERS CONSTRUCTED BY EDGE DETECTION USING MESSA...
PDF
An Efficient Algorithm for Edge Detection of Corroded Surface
PDF
Paper 58 disparity-of_stereo_images_by_self_adaptive_algorithm
PDF
A ROBUST BACKGROUND REMOVAL ALGORTIHMS USING FUZZY C-MEANS CLUSTERING
DOC
Research Paper v2.0
PDF
Motion Human Detection & Tracking Based On Background Subtraction
PDF
Trajectory Based Unusual Human Movement Identification for ATM System
PDF
Conference research paper_target_tracking
PDF
GPGPU-Assisted Subpixel Tracking Method for Fiducial Markers
PDF
Stereo Correspondence Estimation by Two Dimensional Real Time Spiral Search A...
PDF
K-Means Clustering in Moving Objects Extraction with Selective Background
PDF
Vhdl implementation for edge detection using log gabor filter for disease det...
PDF
高解析度面板瑕疵檢測
PDF
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project R...
PDF
Performance Evaluation of Image Edge Detection Techniques
PDF
Binary operation based hard exudate detection and fuzzy based classification ...
PDF
Proposal and Implementation of the Connected-Component Labeling of Binary Ima...
PDF
A New Approach of Iris Detection and Recognition
REGISTRATION TECHNOLOGIES and THEIR CLASSIFICATION IN AUGMENTED REALITY THE K...
V.KARTHIKEYAN PUBLISHED ARTICLE 1
PARALLEL GENERATION OF IMAGE LAYERS CONSTRUCTED BY EDGE DETECTION USING MESSA...
An Efficient Algorithm for Edge Detection of Corroded Surface
Paper 58 disparity-of_stereo_images_by_self_adaptive_algorithm
A ROBUST BACKGROUND REMOVAL ALGORTIHMS USING FUZZY C-MEANS CLUSTERING
Research Paper v2.0
Motion Human Detection & Tracking Based On Background Subtraction
Trajectory Based Unusual Human Movement Identification for ATM System
Conference research paper_target_tracking
GPGPU-Assisted Subpixel Tracking Method for Fiducial Markers
Stereo Correspondence Estimation by Two Dimensional Real Time Spiral Search A...
K-Means Clustering in Moving Objects Extraction with Selective Background
Vhdl implementation for edge detection using log gabor filter for disease det...
高解析度面板瑕疵檢測
Image Segmentation using Otsu's Method - Computer Graphics (UCS505) Project R...
Performance Evaluation of Image Edge Detection Techniques
Binary operation based hard exudate detection and fuzzy based classification ...
Proposal and Implementation of the Connected-Component Labeling of Binary Ima...
A New Approach of Iris Detection and Recognition
Ad

Viewers also liked (20)

PDF
D0952126
PDF
Bioconversion of Penicillin to Cephalosporin
PDF
Energy saving in P2P oriented Wireless Sensor Network (WSN) using the approac...
PDF
Ultimate Behavior of Lightweight High Strength Concrete Filled Steel Tube (LW...
PDF
CFD Simulation and Analysis of Fluid Flow Parameters within a Y-Shaped Branch...
PDF
Congestion Control in Manets Using Hybrid Routing Protocol
PDF
Self-Medication of Anti-Biotics amongst University Students of Islamabad: Pre...
PDF
A Study To Locate The Difference Between Active And Passive Recovery After St...
PDF
Performance Evaluation of Soft RoCE over 1 Gigabit Ethernet
PDF
Submerged fermentation of laccase producing Streptomyces chartreusis using bo...
PDF
Heuristic Route Discovery for Shared Firewall Network
PDF
Injection of Attacks in MANETs
PDF
A Comparative Study of Certain Administrative and Academic Aspects of Minorit...
PDF
Speech Based Search Engine System Control and User Interaction
PDF
I0557277
PDF
Literature Survey On Clustering Techniques
PDF
Notions via β*-open sets in topological spaces
PDF
Simple and Effective Method of the Synthesis of Nanosized Fe2O 3particles
PDF
Low Power FPGA Based Elliptical Curve Cryptography
PDF
A Comparative Study on Recovery Pulse Rate after 12 Minute Run and Walk Test
D0952126
Bioconversion of Penicillin to Cephalosporin
Energy saving in P2P oriented Wireless Sensor Network (WSN) using the approac...
Ultimate Behavior of Lightweight High Strength Concrete Filled Steel Tube (LW...
CFD Simulation and Analysis of Fluid Flow Parameters within a Y-Shaped Branch...
Congestion Control in Manets Using Hybrid Routing Protocol
Self-Medication of Anti-Biotics amongst University Students of Islamabad: Pre...
A Study To Locate The Difference Between Active And Passive Recovery After St...
Performance Evaluation of Soft RoCE over 1 Gigabit Ethernet
Submerged fermentation of laccase producing Streptomyces chartreusis using bo...
Heuristic Route Discovery for Shared Firewall Network
Injection of Attacks in MANETs
A Comparative Study of Certain Administrative and Academic Aspects of Minorit...
Speech Based Search Engine System Control and User Interaction
I0557277
Literature Survey On Clustering Techniques
Notions via β*-open sets in topological spaces
Simple and Effective Method of the Synthesis of Nanosized Fe2O 3particles
Low Power FPGA Based Elliptical Curve Cryptography
A Comparative Study on Recovery Pulse Rate after 12 Minute Run and Walk Test
Ad

Similar to B0220609 (20)

PDF
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
DOC
195706916 i journals-paper-template-2013
PDF
Implementation of Distributed Canny Edge Detection Technique
PDF
An Efficient Algorithm for Edge Detection of Corroded Surface
PPTX
Canny Edge Detection
PPTX
Edge Detection
PDF
Real time Canny edge detection
PDF
A NOBEL HYBRID APPROACH FOR EDGE DETECTION
PPSX
Exploring Methods to Improve Edge Detection with Canny Algorithm
PPT
Feature Detection and Matching
PDF
Canny Edge Detection Algorithm on FPGA
PDF
Canny Edge Detection Algorithm on FPGA
PDF
C010111519
PDF
Evaluate Combined Sobel-Canny Edge Detector for Image Procssing
PDF
Algorithm for the Comparison of Different Types of First Order Edge Detection...
PDF
A010110104
PPTX
Canny Edge & Image Representation.pptx
PPT
Edge detection iOS application
PDF
Mobile Application Detection of Road Damage using Canny Algorithm
PDF
A Review on Edge Detection Algorithms in Digital Image Processing Applications
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
195706916 i journals-paper-template-2013
Implementation of Distributed Canny Edge Detection Technique
An Efficient Algorithm for Edge Detection of Corroded Surface
Canny Edge Detection
Edge Detection
Real time Canny edge detection
A NOBEL HYBRID APPROACH FOR EDGE DETECTION
Exploring Methods to Improve Edge Detection with Canny Algorithm
Feature Detection and Matching
Canny Edge Detection Algorithm on FPGA
Canny Edge Detection Algorithm on FPGA
C010111519
Evaluate Combined Sobel-Canny Edge Detector for Image Procssing
Algorithm for the Comparison of Different Types of First Order Edge Detection...
A010110104
Canny Edge & Image Representation.pptx
Edge detection iOS application
Mobile Application Detection of Road Damage using Canny Algorithm
A Review on Edge Detection Algorithms in Digital Image Processing Applications

More from IOSR Journals (20)

PDF
A011140104
PDF
M0111397100
PDF
L011138596
PDF
K011138084
PDF
J011137479
PDF
I011136673
PDF
G011134454
PDF
H011135565
PDF
F011134043
PDF
E011133639
PDF
D011132635
PDF
C011131925
PDF
B011130918
PDF
A011130108
PDF
I011125160
PDF
H011124050
PDF
G011123539
PDF
F011123134
PDF
E011122530
PDF
D011121524
A011140104
M0111397100
L011138596
K011138084
J011137479
I011136673
G011134454
H011135565
F011134043
E011133639
D011132635
C011131925
B011130918
A011130108
I011125160
H011124050
G011123539
F011123134
E011122530
D011121524

Recently uploaded (20)

PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPT
Teaching material agriculture food technology
PPTX
1. Introduction to Computer Programming.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
August Patch Tuesday
PDF
Approach and Philosophy of On baking technology
PPTX
Tartificialntelligence_presentation.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Getting Started with Data Integration: FME Form 101
Heart disease approach using modified random forest and particle swarm optimi...
Teaching material agriculture food technology
1. Introduction to Computer Programming.pptx
Encapsulation theory and applications.pdf
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
Group 1 Presentation -Planning and Decision Making .pptx
Digital-Transformation-Roadmap-for-Companies.pptx
August Patch Tuesday
Approach and Philosophy of On baking technology
Tartificialntelligence_presentation.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A comparative study of natural language inference in Swahili using monolingua...
OMC Textile Division Presentation 2021.pptx
NewMind AI Weekly Chronicles - August'25-Week II
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Programs and apps: productivity, graphics, security and other tools
Getting Started with Data Integration: FME Form 101

B0220609

  • 1. IOSR Journal of VLSI and Signal Processing (IOSR-JVSP) Volume 2, Issue 2 (Mar. – Apr. 2013), PP 06-09 e-ISSN: 2319 – 4200, p-ISSN No. : 2319 – 4197 www.iosrjournals.org www.iosrjournals.org 5 | Page Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using FPGA for Area Optimization Chandrashekar N.S.1 , Dr. K.R. Nataraj 2 1, Department of ECE, Don Bosco Institute of Technology, Bangalore, Karnataka, India. 2, Department of ECE, SJB Institute of Technology, Bangalore, Karnataka, India. Abstract: In this paper, image smoothening, gradient magnitude, hystersis used in Canny edge detection algorithm is presented. The new algorithm used has a low-complexity 8-bin non-uniform gradient magnitude histogram to compute block-based hysteresis thresholds that are used by the Canny edge detector. This also achieves less memory requirements, decreased latency and increased throughput with no loss in edge detection. Furthermore, the hardware architecture of the proposed algorithm is presented in this paper and the architecture is synthesized on the Xilinx Virtex 5 FPGA. The design development is done in VHDL and simulated results are obtained using modelsim 6.3 with Xilinx 12.2. Keywords: - Canny Edge detector, Distributed Processing, FPGA, Non-uniform quantization. I. Introduction Edge detection, as a basic operation in image processing, has been researched extensively. A lot of edge detection algorithms, such as Robert detector, Prewitt detector, Kirsch detector, Gauss-Laplace detector and canny detector have been proposed. Among these algorithms, canny algorithm has been used widely in the field of image processing because of its good performance [1]. The edge detection process serves to simplify the analysis of images by drastically reducing the amount of data to be processed, while at the same time preserving useful structural information about object boundaries. There is certainly a great deal of diversity in the applications of edge detection, but it is felt that many applications share a common set of requirements [2]. The Canny edge detector is predominantly used in many real-world applications due to its ability to extract significant edges with good detection and good localization performance. Unfortunately, the canny edge detection algorithm contains extensive pre-processing and post-processing steps and is more computationally complex than other edge detection algorithms. Furthermore, it performs hysteresis thresholding which requires computing high and low thresholds based on the entire image statistics. This places heavy requirements on memory and results in large latency hindering real-time implementation of the Canny edge detection algorithm [3]. In [1, 2], a recursively implementable edge detection algorithm is suggested and optimized using retiming techniques. But its performance is quite poor in images with low SNRs. The approach of [5, 6] combines the derivative and smoothening operations of the Canny algorithm into a single mask to reduce computations. The pipelined implementation is a block-based approach with a block-size of 2 rows of pixels. It overcomes the dependencies between the blocks by fixing high and low thresholds to a constant value. In both of these approaches gradient thresholds are not adapted to the image characteristics, and their performance is not guaranteed for blurred images and images with low SNRs [3]. In [7], an improvised approach is done for image edge detection and its efficiency with a set of images. Results confirm that the DOW-canny edge detector, besides being insensitive to noise, is able to fabricate superior and accurate edges in regions of fine graining, geometrical figures and alpha-numerics as compared to the current edge detection techniques. The original Canny algorithm computes the higher and lower thresholds for edge detection based on the entire image statistics, which prevents the processing of blocks independent of each other. In order to reduce memory requirements, decrease latency and increase throughput, a distributed canny edge detection algorithm is proposed in [4]. The hysteresis threshold calculation is a key element that greatly affects the edge detection results. However, the original canny algorithm computes the high and low thresholds for edge detection based on the entire image statistics, which prevents the processing of individual blocks independently. Quality control has been performed in hard work conditions and made easier using automated visual systems quality control. It performs faults detection and final quality control. Edges and faults on ceramic tiles were detected using Canny edge detector. Problem of defining hysteresis thresholds was resolved with a histogram subtraction method [5]. In this paper it is presented the method for faults detection based on edge detection techniques. A method based on non-uniform and coarse quantization of the gradient magnitude histogram was proposed. In addition, the proposed algorithm is mapped onto reconfigurable
  • 2. Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using www.iosrjournals.org 6 | Page hardware architecture. The threshold is calculated using the data of the histogram of gradient magnitude rather than is set manually in a failure-and-try fashion and can give quite good edge detection results without the intervening of an operator. This paper is organized as follows. Section 2 gives a Brief analysis of the Canny edge detector algorithm. Section 3 presents the implementation of proposed Canny edge detection algorithm. Simulation results are presented in Section 4. A conclusion is given in Section 5. II. ANALYSIS OF CANNY EDGE DETECTOR The block diagram of the Canny edge detection algorithm is demonstrated in “Fig.” 1. The original canny algorithm [2] consists of the following steps:  Smoothing the input image by Gaussian mask. The output smoothed image is denoted as I(x, y).  Calculating the horizontal gradient Gx(x, y) and vertical gradient Gy (x, y) at each pixel location by convolving the image I(x, y) with partial derivatives of a 2D Gaussian function.  Computing the gradient magnitude G(x, y) and direction θG (x, y) at each pixel location. (1) θG = arctan (Gy/Gx) (2)  Applying non-maximum suppression (NMS) to thin Edges  Computing the hysteresis high and low thresholds based on the histogram of the magnitudes of the gradients of the entire image.  Performing hysteresis thresholding to determine the edge map. Low Pass Filter Horizantal and Vertical Gradients Gradient Magnitude and Direction Non Maximal Suppressi on (NMS) Compute the high and low thresholds Hysteresis Thresholdi ng Input Image Edge Map Fig 1.Block diagram of the Canny edge detection algorithm. II. IMPLEMENTATION OF THE PROPOSED CANNY EDGE DETECTOR In this section, the hardware implementation of proposed canny edge detection algorithm on the Xilinx FPGA is described. In the proposed architecture, it consists of the following 5 units in “Fig.” 2.  Smoothening unit using Gaussian filter.  Vertical and horizontal gradient Magnitude calculation unit.  Directional non-maximum suppression unit.  High and low threshold Calculation unit.  Thresholding with hysteresis unit. PinG Pong Buffer Gaussian Magnitude Horizontal and Vertical Gradient Calculation Directional Non- Maximal Suppression Calculation Thresholds Thresholding With Hysteresis DATA CE Fig. 2: Block diagram of the compute engine.
  • 3. Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using www.iosrjournals.org 7 | Page 2.1 Image Smoothening: The input image was smoothened using a 3×3 Gaussian mask. The Gaussian filter is separable and, thus, the implementation of the 2-D convolution with the 3×3 Gaussian mask was achieved using row and column 1- D convolutions. 2.2 Gradients and Gradient Magnitude Calculation: Calculation of the vertical and horizontal gradients using convolution kernels was done in this stage. The kernels vary in size from 3 × 3 to 9 × 9, depending on the sharpness of the image. The whole design was pipelined, and thus the output was generated every clock cycle. This was an input to the magnitude calculation unit which computes, at each pixel location, the gradient magnitude from the pixel’s horizontal and vertical gradients. 2.3 Directional Non Maximum Suppression: In order to access all the pixels’ gradient magnitudes in the 3 × 3 window at the same time, two FIFO buffers were employed. The horizontal gradient Gx and the vertical gradient Gy control the selector which delivers the gradient magnitude of neighbors along the direction of the gradient, into the arithmetic unit. This arithmetic unit consisted of one divider, two multipliers and one adder, which were implemented using the Xilinx Math Functions IP cores. The output of the arithmetic unit was compared with the gradient magnitude of the center pixel, and the pixel that has no local maximum gradient magnitude was eliminated. 2.4 Calculation of the hysteresis thresholds: Since the low and high thresholds were calculated based on the gradient histogram, the histogram of the image was computed after it had undergone directional non-maximum suppression. As discussed in Section 2, an 8-step non-uniform quantizer was employed to obtain the discrete histogram for each processed block. The block-based hysteresis thresholds (high threshold ThH and low threshold ThL) were computed. 2.5 Thresholding with hysteresis: Since, the output of the non maximum suppression unit contains some spurious edges, the method of thresholding with hysteresis was used. Two thresholds, high threshold ThH and low threshold ThL, which were obtained from the threshold calculation unit, were employed. Let f(x, y) be the image obtained from the non maximum suppression stage, f1(x, y) be the strong edge image and f2(x, y) be the weak edge image. 2 SIMULATION RESULTS AND ANALYSIS Proposed system is implementation in FPGA using Device Virtex 5 XC5VTX240T and Package FF1759. “Fig.” 3(a) shows design utilization summary of Image smoothening (thin blurring) and “Fig.” 3(b) and “Fig.” 3(c) shows RTL top module schematic and simulation results of Non smoothening (thin blurring) respectively. Logic Utilization Used Available Utilization Number of Slice Registers 8353 149760 5% Numbers of Slice LUTs 19968 149760 13% Number of fully used LUT- FF pairs 3242 25079 12% Number of bonded IOBs 22 680 3% Number of BUFG/BUFGCTRLs 3 32 9% Fig.3 (a). Design Summary of Image smoothening (thin bluring) Unit Fig.3 (b). RTL Top module Schematic of Image smoothening (thin bluring) Unit
  • 4. Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using www.iosrjournals.org 8 | Page Fig. 3(c). Simulation Results of Image smoothening (thin bluring) Unit “Fig.” 4(a) shows design utilization summary of Gradient phase Unit and “Fig.” 4 (b) and “Fig.”4(c) shows RTL top module schematic and simulation results of Gradient phase Unit respectively. Logic Utilization Used Available Utilization Number of Slice Registers 11434 149760 7% Numbers of Slice LUTs 24093 149760 16% Number of fully used LUT-FF pairs 5120 30407 16% Number of bonded IOBs 26 680 3% Number of BUFG/BUFGCTRLs 3 32 9% Number of DSP48Es 2 96 2% Fig.4 (a). Design Summary of Gradient phase Unit. Fig.4 (b) RTL Top module Schematic of Gradient phase Unit Fig. 4(c). Simulation Results of Gradient phase Unit “Fig.” 5(a) shows design utilization summary of Hysteresis Unit and “Fig.” 5(b) and “Fig.” 5(c) shows RTL top module schematic and simulation results of Hysteresis Unit respectively.
  • 5. Image Smoothening Gradient Magnitude and Hystersis Calculation for Canny Edge Detector Using www.iosrjournals.org 9 | Page Device Utilization Summary(estimated values) Logic Utilization Used Available Utilization Numbers of Slice LUTs 10 149760 0% Number of fully used LUT-FF pairs 0 10 0% Number of bonded IOBs 36 680 5% Number of BUFG/BUFGCTRLs 1 32 3% Fig.5 (a). Design Summary of Hysteresis Unit. Fig.5 (b) RTL Top module Schematic of Hysteresis Unit. Fig.5(c).Simulation Results of Hysteresis Unit. V. CONCLUSION A new canny edge detector algorithm using FPGA implementation for Image smoothening and gradient magnitude was proposed in this work. A novel non-uniform quantized histogram calculation method was used in this work in order to reduce the computational cost of the hysteresis threshold selection. As a result, the computational cost of the proposed algorithm was found to be very low compared to the original Canny edge detection algorithm. The algorithm is mapped to onto a Xilinx Virtex-5 FPGA platform and tested using ModelSim. It is capable of supporting fast real-time edge detection for images and videos with various spatial and temporal resolutions including full-HD content. REFERENCES [1] L. Torres, M. Robert, E. Bourennane, and M. Paindavoine, “Implementation of a recursive real time edge detector using Retiming techniques,” VLSI, Aug. 1995, pp.811 –816. [2] J. Canny, “A computational approach to edge detection,”IEEE Trans. PAMI, vol. 8, no. 6, Nov. 1986, pp. 679 –698. [3] Qian Xu, Chaitali Chakrabarti and Lina J. Karam,”A Distributed Canny Edge Detector and Its Implementation On FPGA”, Arizona State University, Tempe, AZ. 2011. [4] S. Varadarajan, C. Chakrabarti, L. J. Karam, and J. M.Bauza, “A Distributed psycho-visually motivated canny edge detector,” IEEE ICASSP, Mar. 2010, pp. 822 –825,. [5] Željko Hocenski, Suzana Vasilić, “Improved Canny Edge Detector in Ceramic Tiles Defect Detection”, Osijek, Croatia 6-10 Nov2006. [6] W. He and K. Yuan, “An improved Canny edge detector and its Realization on FPGA,” WCICA, Jun. 2008, pp. 6561 –6564. [7] Anand Gupta , Ravi Kumar Dalal,Rahul Gupta,Pulkit Wadhwa “DOW-Canny: An Improvised Version Of Canny Edge Detector”. (ISPACS) December 2011, pp. 7-9.