Sei sulla pagina 1di 6

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/286813400

Performance study of edge detection operators

Conference Paper · July 2014


DOI: 10.1109/EmbeddedSys.2014.6953040

CITATIONS READS

6 106

5 authors, including:

Anphy Jose Anjitha Vadukoot


A P J Abdul Kalam Technological University College of Engineering Trivandrum
1 PUBLICATION 6 CITATIONS 2 PUBLICATIONS 6 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Anjitha Vadukoot on 13 January 2016.

The user has requested enhancement of the downloaded file.


International Conference on Embedded Systems - (ICES 2014) 7

Performance Study of Edge Detection Operators


Anphy Jose, Deepa Merlin Dixon K, Naiji Joseph &
Ms. Anjitha V
Silpa George E
Dept. Electronics and Communication (Assistant professor)
Dept.Electronics and Communication Jyothi Engineering College
Jyothi Engineering College Thrissur, Kerala
Thrissur, Kerala anjitha.gkrishnan@gmail.com
anphyjos@gmail.com, deepamerlin123@gmail.com,
naijimaprani@gmail.com, silpageorge2013@gmail.com

Abstract—Image analysis includes many preprocessing as ll as


post processing steps and edge detection is one among the II. EDGE DETECTION TECHNIQUES
preprocessing steps. The intensity variation in an image is treated
as an edge. There are several edge detection operators available
Edge detection can be performed in ambiguous ways.
in image processing. This paper presents a comparative study Broadly it can be categorised into two:
among various operators such as Sobel, Prewitt, Roberts and
Canny based on its performance parameters. The software is • Gradient based edge detection
developed using MATLAB R2012a.
The gradient method determines the first derivative of the
IndexTerms— Sobel edge detector, Prewitt edge detector image and the maximum and minimum points are taken into
Roberts edge detector, Canny edge detector, Peak Signal to Noise
consideration to detect the edges. It marks the places where the
Ratio (PSNR), Mean Square Error (MSE), Maximum Squared
Error (MAXERR), L2RAT. gradient magnitudes are larger than a predetermined threshold.

• Laplacian based edge detection


I. INTRODUCTION
Second derivative of the image is found out and zero
Edge detection has potential role in image processing. crossings of the image are used to trace the edges. Since the
Unwanted data is filtered out whereas the important structural edges are modeled as ramp like profile, it is more efficient to
features of the image are preserved. The data of image mark the true edge.
contains different information such as object’s size, shape, Both the above techniques have a disadvantage that it is
color and orientation. Earlier methods of edge detection more sensitive to noise. To neglect this disadvantage, J F
comprise of convolution of the image with an operator which Canny [1] proposed a new edge detection algorithm. Canny
is designed to be sensitive to higher gradients in the image. edge detection provides low error rate, good localisation and a
There are several types of edge detection techniques. Selection single response to a single edge.
of the best edge detection operator is a crucial step. Noise This paper deal with gradient based edge detection
environment, edge orientation, edge structure and luminance techniques using Sobel, Prewitt, Roberts and Canny operators.
are the variables involved in the selection of edge detector.
The operator is so chosen that it is sensitive where the pixel
intensity has a gradual change. The serious issues regarding III. EDGE DETECTION OPERATORS
edge detection are false edge detection, high processing time
etc. Therefore, based on different parameters, a comparative A. Sobel operator
study between various edge detection operators is performed The Sobel operator is a basic first order edge detection
and analyzed. operator. As depicted in Fig. 1, Sobel operator makes use of
This section provides glimpse of idea about the edge two 3*3 convolution masks. Second mask is 90 degree
detection operation which is considered as the central issue of rotation of first mask.
the paper. Section II holds various edge detection techniques.
There are various edge detection operators in image analysis.
Section III outlays an overview of these. Section IV consists of
various performance parameters and these includes PSNR,
MSE, and MAXERR. This section also includes the
mathematical formulation of each of these parameters. Section
V includes results based on the output obtained. Section VI
comprises of the inferences obtained after analyzing the
observation table.

978-1-4799-5026-3/14/$31.00 ©2014 IEEE


International Conference on Embedded Systems - (ICES 2014) 8

D. Canny edge detection algorithm


The Canny edge detection algorithm is found to be an
optimal edge detector. This algorithm was proposed by John
Canny and presented the ideas in his paper, “A Computational
Approach To Edge Detection” [1]. The paper proposes, an
ideal operator that maximizes the conventional signal to noise
ratio in detecting a particular edge. Canny edge detection
algorithm is carried out through the following steps.
Figure. 1. Masks for Sobel operator
• Filtering the image
The first step of Canny edge detection algorithm is to
Each of these masks responds to the edges in horizontal
filter out any noise present in the original image. Filtering
and vertical directions in its maximum possible ways. The
can be achieved through the use of different filters. A
masks are operated horizontally and vertically to obtain the
Gaussian filter is used since Gaussian noise is the most
gradients in corresponding directions.
common noise in image systems. The response of a
Magnitude of the gradient can be calculated as Gaussian filter is a Gaussian function. It just smoothens the
image while blurring the noise and preserving the important
Gmag=ඥሺ‫ ݔܩ‬ଶ ൅ ‫ ݕܩ‬ଶ ሻ (1)  features. The performance of smoothening depends on
‹”‡…–‹‘‘ˆ–Š‡‰”ƒ†‹‡–…ƒ„‡ƒ–Š‡ƒ–‹…ƒŽŽ›ˆ‘”—Žƒ–‡† standard deviation and filter size. The filter size is much
ĥ less than the size of original image. Standard deviation
ீ௬
Gdir = ‫ି݊ܽݐ‬ଵ ሺ ሻ (2) measures the degree of smoothening.
ீ௫
Gaussian distribution function in 2D form is given by,

B. Prewitt operator ଵ
‫ܩ‬ሺ‫ݔ‬ǡ ‫ݕ‬ሻ ൌ ቀଶగఙమ ቁ ݁ ିሺ௫
మ ା௬ మ ሻȀଶఙ మ
(3)
Prewitt operator is in the very sense similar to Sobel
edge detector. Also it takes the advantage of 3*3 convolution Where ı represents standard deviation. The smoothened
masks in orthogonal directions. The masks are shown in Figure image is represented by the convolution of original image and
2.
Gaussian function.

‫ܪ‬ሺ‫ݔ‬ǡ ‫ݕ‬ሻ ൌ ‫ܫ‬ሺ‫ݔ‬ǡ ‫ݕ‬ሻ ‫ܩ כ‬ሺ‫ݔ‬ǡ ‫ݕ‬ሻ (4)

• Gradient magnitude and direction


Gradient image is determined and thus edge strength is
obtained after smoothening the image. Gradient is a two
dimensional vector consisting of both the magnitude and
direction. Magnitude of the gradient represents the strength
Figure. 2. Masks for Prewitt edge detector
of the edge whereas the direction of gradient symbolises the
direction of maximum edge strength for each pixel in the
C. Roberts operator image. Let Gx denote the horizontal gradient and Gy be the
It is an easy to compute two dimensional gradient operator. vertical gradient. Then gradient magnitude and directions
A 2*2 convolution mask is employed in both the directions. are calculated using Equations (1) & (2) respectively.
One mask is simply the other rotated by 90 degree .The masks
are shown in Figure 3. Prewitt operator is similar to Sobel • Non maximal suppression
operator. Non maximal suppression is a necessary procedure to
be performed so as to avoid false edges and therefore in
this very step, suppression of any pixel value that is not
considered to be an edge is done. This in fact is fulfilled
by preserving all local maxima points and deleting
everything else. That means, all points where the gradient is
not maximum are suppressed. It distinguishes the true
edges and false edges and hence find the true edges.

• Hysteresis thresholding
Figure. 3. Masks for Roberts operator The process is collectively known as removal of spurious
edges. This method of thresholding makes use of two
thresholds: upper threshold and lower threshold. Thresholds
International Conference on Embedded Systems - (ICES 2014) 9

are set according to the image statistics. Randomly select a


pixel and it is undergone consideration and if the value of
that particular pixel is greater than upper threshold value
that we have chosen, it is set as a true edge and if the
converse is true, it is negatively acknowledged as an edge.
If the pixel value is in between , a more specific scrutiny is
accomplished by checking whether the pixel under
consideration is in the neighbourhood of any edge pixel. If
it is so, it is taken as an edge pixel. Otherwise, it is taken as
a non edge pixel.

IV. PERFORMANCE PARAMETERS


A. Peak Signal to Noise Ratio
Peak signal to noise ratio is measured in decibels. This
ratio is often used as a quality measurement between the
original image and compressed image. The higher the PSNR,
the better the quality of compressed image or reconstructed
image. PSNR is calculated using the following equation,

ோమ
ܴܲܵܰ ൌ ͳͲ݈‫݃݋‬ଵ଴ ሺ ሻ (5)
ெௌா
Where R is the maximum fluctuation in the input image data
type. For a gray level image, R is taken as 255 where each
pixel value is represented as an 8 bit integer.

B. Mean Square Error


MSE represents the cumulative squared error between the
compressed and original image, whereas PSNR represents a
measure of peak error. If the value of MSE is low, then error
rate will be low. MSE is calculated as follows, Figure. 4. Comparison of edge detectors, (a) input image (b) Sobel (c)
Prewitt (d) Canny (e) Roberts
‫ ܧܵܯ‬ൌ σெǡேሺሺ‫ͳܫ‬ሺ݉ǡ ݊ሻ െ ‫ʹܫ‬ሺ݉ǡ ݊ሻሻଶ Ȁሺ‫ܰ כ ܯ‬ሻ (6)

Where M, N are the number of rows and columns in the input


image respectively. MSE is the squared norm of difference
between real image and compressed image divided by the
number of elements in the signal or image.

C. Maximum squared Error


MAXERR represents the maximum absolute squared
deviation of data from approximation.

D. L2RAT
L2RAT is the ratio of the squared norm of the signal or
image approximation to the input signal.

V. RESULTS
The results for various edge detection operators are
obtained as follows. Two different input images are
considered. The edge detected outputs and performance
parameter values for each edge detection operator are
shown.
International Conference on Embedded Systems - (ICES 2014) 10

TABLE II.TABLE SHOWING THE VALUES FOR THE SECOND


INPUT IMAGE

Edge PSNR MSE MAXERR L2RAT Processing


detection time (ms)
operators
Sobel 10.4058 5.9224e+03 228 0.4566 261

Prewitt 9.833 6.7569e+03 234 0.5222 210

Canny 10.4904 5.8081e+03 210 2.9110e- 719


05
Roberts 11.6694 4.4273e+03 230 0.1514 190

VI. INFERENCES
By analysing the first input image which has mainly low
frequency contents in it, PSNR value is higher for Sobel
operator and it is lower for Prewitt and the value of the same
for Canny operator is in between of these two. MSE is
minimum for Sobel operator and maximum for Robert operator
and Canny holds a value in between. MAXERR is the same for
all the operators. L2RAT is higher for Sobel operator and
lower for Roberts operator. Canny offers a value in between
them. Canny operator possesses higher processing time than
other operators which is approximately 730ms.
By analysing the second input image which is having high
frequency contents compared to first input image, Roberts
operator offers high PSNR and minimum MSE. Canny
Figure. 5. Comparison of edge detectors (a) input image (b) Sobel (c) operator provides low MAXERR, low L2RAT and high
Prewitt (d) Canny (e) Roberts processing time compared to all other operators.
The two sets of images are compared and by considering all
parameters such as PSNR,MSE,MAXERR,L2RAT canny
operator has the optimal value even though it possess a greater
The following tables give a comparative study of processing time. Ignoring the latter case canny is chosen as the
performance parameters of various edge detection best edge detection operator.
operators.

TABLE I. TABLE SHOWING THE VALUES FOR THE FIRST


INPUT IMAGE VII. CONCLUSION
A comparative study of various edge detection operators is
Edge PSNR MSE MAXERR L2RAT Processing conducted based on some performance parameters. All the
detection time (ms) parameters are found to vary according to the image statistics
operators like lighting conditions, input image size, presence of noise etc.
Sobel 6.289 1.527e+04 255 4.5729 265
According to the observations, it is concluded that Canny
Prewitt 4.8980 2.1051e+04 255 0.0443 215 operator is selected as an optimal edge detector.The same edge
detection algorithm can be implemented with FPGA in the
Canny 4.9068 2.1009e+04 255 6.9625e- 730
VLSI counterpart but in this approach MATLAB is used.
06
Roberts 5.0634 2.0265e+04 255 0.0090 182

REFERENCES
[1]. John Canny,”A Computational Approach to Edge
Table 1: Table showing the values for first input image Detection”.IEEE Transactions on Pattern Analysis and
Machine Intelligence, Vol.PAMI-8,NO.6,November 1986.
[2]. Xiaoyang Li, Jie Jiang, Qiaoyun Fan, “An Improved
Real-time Hardware Architecture for Canny Edge
Detection Based on FPGA”.Third International Conference
on Intelligent Control and Information Processing, July 15-
International Conference on Embedded Systems - (ICES 2014) 11

17, 2012 - Dalian, China-978-1-4577-2143- on Innovative Computing Information and Control -


4/12/26.00/2012 IEEE. Volume I (ICICIC 06), 2006
[3]. I.Yasri, N.H.Hamid, V.V.Yap, "Performance Analysis [9]. Jung Me Park. "Edge Detection in Grayscale, Color,
of FPGA Based Sobel Edge Detection and Range Images", Wiley Encyclopedia of Computer
Operator”International Conference on Electronic Design, Science and Engineering, 04/15/2008
December1-3, 2008, Penang, Malaysia, 978-1-4244-2315- [10]. Zhang, James Z., Zijing Qin, Peter C. Tay, and Robert
6/08/2008 IEEE. D. Adams. "A novel facial expression recognition method
[4]. Eng. Dina Alghurair,Sefwan S. Al-Rawi, "Design of using fast BEMD based edge detection", 2010 Conference
Sobel Operator Using Field Programmable Gate Record of the Forty Fourth Asilomar Conference on
Arrays",ISBN: 978-1-4673-5613-8/2013 IEEE. Signals Systems and Computers, 2010
[5]. R. Ponneela Vignesh,R. Rajendran, "Performance and [11]. Raman Maini, Dr. Himanshu Aggarwal, ”Study and
Analysis of Edge detection using FPGA Implementation” comparison of various edge detection operators”,
International Journal of Modern Engineering Research International journal of image processing (IJP), volume.3:
(IJMER) , Vol.2, Issue.2, Mar-Apr 2012, pp-552-554 . issue.1
[6]. G. Anusha1,Dr.T. Jaya Chandra Prasad, Dr. D. Satya [12]. Jasdeep Kaur, Mamta Garg, “Review of better detail
Narayana, "Implementation of SOBEL Edge Detection on preserving algorithm for impulse noise reduction”,
FPGA", International Journal of Computer Trends and International jurnal of science and research”, Volume.
Technology-volume3,Issue.3- 2012. 2:Issue:3
[7]. L.Padma Latha, "Design of Edge Detection Technique
Using FPGA (Field Programmable Gate Array) and DSP
(Digital Signal Processor)",VSRD International Journal of
Electrical, Electronics and Comm. Engg. Vol. 2 (6), 2012.
[8]. He Mingyi. "Image Feature Detection and Matching
Based on SUSAN Method", First International Conference

View publication stats

Potrebbero piacerti anche