0% found this document useful (0 votes)
14 views4 pages

Sobel

This paper presents an improved edge detection algorithm based on the Sobel operator, which addresses its limitations by incorporating additional templates for 45-degree and 135-degree directions. The proposed method enhances edge detection accuracy and reduces noise, resulting in more detailed and concrete edge information compared to traditional Sobel detection. Experimental results demonstrate the effectiveness of the improved algorithm, which utilizes Otsu's method for optimal threshold selection in image binarization.

Uploaded by

wafazulfiqar731
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Sobel

This paper presents an improved edge detection algorithm based on the Sobel operator, which addresses its limitations by incorporating additional templates for 45-degree and 135-degree directions. The proposed method enhances edge detection accuracy and reduces noise, resulting in more detailed and concrete edge information compared to traditional Sobel detection. Experimental results demonstrate the effectiveness of the improved algorithm, which utilizes Otsu's method for optimal threshold selection in image binarization.

Uploaded by

wafazulfiqar731
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Advances in Computer Science Research, (ACSR), volume 52

2016 International Conference on Computer Engineering and Information Systems (CEIS-16)

Edge Detection Based on Improved Sobel Operator

Chao-Chao Zhang, Jian-Dong Fang


Inner Mongolia University of Technology
Electric Engineering College,
Hohhot 010080, China
E-mail: 185617614@qq.com, fangjd@163.com

Abstract-Sobel algorithm is an important method of image edge many respects, Sobel operators are superior to others.
detection. Comparing the Sobel operator with several other However, the classical Sobel operator also has some
edge detection operators used frequently and making a further problems. The Sobel operator is sensitive only to the
study on the classical Sobel operator, the advantages of Sobel vertical direction and the horizontal direction. However, the
operator are its fast detection speed, meanwhile , it has an image information is not limited to the horizontal and
effect on smoothing and suppressing noise. Also, Sobel vertical direction; it can make part of the image information
operator has a good effect on edge detection. Although Sobel lose. In this paper, a new improved operator is proposed
operator has advantages in many aspects, it exists some based on the sobel operator. On the traditional Sobel
problems: the Sobel operator is a kind of edge detection in
operator, the 45 degrees and 135 degrees 2 direction
horizontal and vertical direction, so it neglects edge points in
other directions. It can not achieve a true detection for the
templates are added to realize multi- directional image
points on image edge. In this paper, the algorithm is based on acquisition. Then calculate the threshold by using the Otsu
the Sobel operator, an increase of 45 degrees and 135 degrees 2 method and refine the detected rough edges by using
direction template, while the main edge of the oblique, binarization method to achieve the results of image edge
re-assigned the weight of the operator template. At the same detection. Edge detection effect can be achieved better by
time, in order to achieve an effect of detection, binarization using Matlab simulation method.
method is used to make an edge thinning for detected image. A comparison table of various operators is shown in
According to simulation experiments, they show this method is Table 1:
simple and feasible, and the detective result is more concrete
and abundant than traditional Sobel edge detection. Some II. THE COMPARISON OF SEVERAL
problems are improved, such as traditional Sobel edge is rough TRADITIONAL OPERATORS
and detection is incomplete.
• Roberts operator: did not pass smooth calculation,
Keywords-sobel operator; binarization; edge detection; edge
so it is more sensitive to the noise.
thinning • Prewitt operator and Sobel operator: edge extraction
effect is almost the same. Prewitt operator is an
I. INTRODUCTION average filter, Sobel operator is a weighted average
filter; they have better detection effect on images
In digital image processing, edge feature is one of the
which have low gray level noise, but the detection
important features of the image, and it is an important part
effect is not obvious.
of image processing, pattern recognition and computer
vision. The results of image edge detection affect the further • LOG operator: detecting edge by using two order
image processing and pattern recognition directly. In recent derivatives zero crossing edge method. Smoothing
decades, the image edge detection technology has become effect is more significant, removing effect of noise
an important research topic in digital image processing is better, but the loss of image details is larger, the
technology. With the development of science and edge precision is lower. So there is a contradiction
technology, researchers have proposed some methods for between positioning edge accuracy and eliminating
image edge detection and evaluation of edge detection. At noise level.
the same time, these edge detection techniques are applied III. THE PRINCIPLES OF THE TRADITIONAL
to the field of computer vision and pattern recognition, SOBEL OPERATOR
which makes the application of edge detection technology
more and more widely [1]. Over the years, image Sobel cross-differential operator, because of its role in
segmentation has been attracting more and more attention. the template is small, the relative calculation is also small,
Thousands of segmentation algorithms have been put thus the image details of the contour can be obtained. But
forward. They can be divided into bit threshold method, because the template size is even, the pending pixel cannot
edge detection method and regional growth method [2]. be placed in the center position of the template, or the
Edge detection method includes: first order differential edge results will have half pixel fault. Sobel differential operator
detection operator includes Roberts operator, Prewitt is a directional differential operator in a basis of odd size
operator, LOG operator and Sobel operator.In contrast, in template. The expressions of formula as follow (3.1), (3.2):

Copyright © 2016, the Authors. Published by Atlantis Press. 129


This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
Advances in Computer Science Research, (ACSR), volume 52

G x (i, j ) = f [i − 1, j + 1] + 2 × f [i, j + 1] idea of Sobel operator algorithm: because the edge of the
image is located at the place in which the brightness
+ f [i + 1, j + 1] − f [i − 1, j − 1] (3.1) changes significantly, therefore in the neighborhood of the
− 2 × f [i, j − 1] − f [i + 1, j − 1]
pixel gray value of pixels exceeds a set threshold depending
on the specific steps for the edge [3]. The specific steps of
Sobel operator algorithm are as follows [4]:
G y (i, j ) = f [i + 1, j − 1] + 2 × f [i + 1, j ] • Moving the horizontal and vertical direction
templates from left to right, from top to bottom, and
+ f [i + 1, j + 1] − f [i − 1, j − 1] (3.2)
moving from one pixel to another, and the center of
the template corresponds to the corresponding
− 2 × f [i − 1, j ] − f [i − 1, j + 1] pixels in the image.
• Multiplying the coefficients in the template with the
corresponding pixel values in the image.
The convolution template of the Sobel operator is • The gradient value is calculated as a new gray value
expressed as the formula (3.3) and (3.4): by using 2 convolution values.
• Select the appropriate threshold TH, if the new pixel
− 1 − 2 − 1 value ≥ TH, the pixel points can be regarded as
G x =  0 0 0  (3.3) image edge points.
 1 2 1  IV. THE IMPROVEMENT OF THE TRADITIONAL
SOBEL OPERATOR
Adding 45 degrees and 135 degrees direction template in
 −1 0 1 a basis of the traditional Sobel operator, the direction
G y = − 2 0 2  (3.4) template are changed into four directions: the horizontal and
vertical direction and 45 degrees and 135 degrees direction.
 − 1 0 1  It improved the weights of new template in the direction of
oblique edge. Specific details are as follows:
The calculating steps of Sobel operator: first, the edge According to the calculation of the four template
detection image is divided into matrix form (3.5): − 1 − 2 − 1 - 2 - 1 0 
0 0 0   - 1 0 1
  
 f1(x − 1, y − 1) f1(x − 1, y ) f1(x − 1, y + 1)  1 2 1   0 1 2
 
A =  f1(x, y − 1) f1(x, y ) f1(x, y + 1)  (3.5) horizontal direction 45 degree direction

 f (x + 1, y − 1) f (x + 1, y ) f (x + 1, y + 1)  − 1 0 1  0 1 2
1 1 1   − 2 0 2  - 1 0 1
   
Multiply horizontal direction by vertical direction of the  − 1 0 1 - 2 - 1 0
template and then multiply the vertical direction by vertical direction 135 degree direction
horizontal direction of the template, Fx=Gx.*A, Fx=Gy.*A. directions and the calculating an image point by point, the
gradient size calculation, as shown in the formula (3.6): maximum value is regarded as the pixel gray values.
According to the threshold setting, edge point is determined.
The template maximum value corresponding to represents
G =  G x2 + G 2y  (3.6) the direction of edge direction of the pixel.
 
A. Edge Thinning Processing
The formula for calculating the gradient direction is shown The edge of the image contains a lot of image
in the formula (3.7): information, by the direction of the traditional Sobel
operator improvement, only the gradient information. The
 Gy  edge appears where the gradient value is large. To extract
θ = arctan 
 (3.7) the edge of the image, a threshold must be set and then
 Gx  binarized. In general, the gradient image obtained by the
gradient operator has a thicker edge. If the gradient image
When θ is equal to zero, there is a vertical edge on threshold is set directly to binarization, it is difficult to find
behalf of the image, the left side is dark er than right side. a suitable threshold, so that the detected edge can meet the
The Sobel operator introduced the weighted local requirements. This is not easy to edge processing and edge
average, it can not only affect the image edge detection but feature extraction and other post-processing.Therefore, it is
also suppress noise further, but the edge is wider. The basis necessary to refine the edge of the gradient before

130
Advances in Computer Science Research, (ACSR), volume 52

binarizing the image gradient [5]. separate Sobel operator for image edge detection, and then
The refinement process is to find the pixel (a, b) Max a use the algorithm for image edge detection; make a
maximum value in the neighborhood of (a, b), and set the comparison between them, Figure 1and4 shows the original,
threshold locally according to Max (a, b). According to the the sobel edge detection is shown in Fig2and5, in this paper
gradient value and the choice of the threshold, so that we edge detection is shown in Fig 3 and 6:
can achieve the refinement of gradient map, with the body is
shown in formula (4.1):

Max(a,b ) ( )
grade a,b > a ∗ Max a,b( )
( )
edge a , b =  (4.1)
 0 other

Type: grade (a, b) pixels (a, b) corresponding to the


Figure 1.
gradient values, Max (a, b) is (a, b) 8 neighborhood
maximum gradient value, a is the control factor (0<a<1),
through the different value of A we can achieve the width K.
Experimental results show that when the value of a in the
0.7-0.9, the edge width of two value is the idealist. It can not
only achieve the purpose of edge thinning, but also helpful
to the threshold selection on the image binarization.
B. Edge Two Value Based on Otsu Method Figure 2. Figure 3.
The selection of gradient image binarization is vital to
image edge detection, it is also considered as a difficulty in
edge detection. This paper adopts the Otsu method, a
method about making class variance maximally determine
threshold automatically. This method is simple, fast, often
used in threshold selection. The way of graythresh
calculating threshold in the MATLAB is Otsu method. The
specific steps are as follows [6]: Figure 4.
• Given an initial threshold TH, the image is divided
into C1 and C2 two categories.
• Calculate the gray mean value of u1 and u2, and the
average u gray value of the image.
• Calculate the probability of p1 and p2.

TH
p1 = ∑p
i =0
i (4.2)
Figure 5.
p2 = 1 − p1 (4.3)

• Computation between class variance


δ b2 .

δ b2 = p1 ∗ (µ1 − µ )2 + p 2 ∗ (µ 2 − µ )2 (4.4)

• Select the best threshold TH1, and according to the


threshold, making the image divided into C1 and C2. Figure 6.
By using the Otsu method in MATLAB, the
threshold value of the graythresh can be obtained. After the detection of the image 45 degrees and 135
Then the threshold value is used to carry out the two degrees directional template, it fully verified the previous
statement. The two directions have edge information of
value of the thinning image.
images, and then make a comparison among the detection of
V. EXPERIMENTAL RESULTS AND the four directions: two direction, vertical direction and
SIMULATION horizontal direction. And found that the direct application of
Sobel operator for edge detection contains more original
When we do simulation experiments in the image edge information than the information of single
MATLAB2010 experimental platform, the first is to take a

131
Advances in Computer Science Research, (ACSR), volume 52

direction edge detection, but there still exists some


disadvantages, such as rough edge detection, inaccurate ACKNOWLEDGMENT
detection. Compared with the traditional Sobel algorithm, it This work is supported by Natural Science Foundation
displayed more information of original image; the edge is of Inner Mongolia Autonomous Region (No. 2014MS0619),
more specific and contains more information. Before the and Inner Mongolia Science and Technology Project (No.
processing of gradient image binarization, the algorithm 20120304). Its research findings that application system of
made a refinement and combined with the oblique edge intelligent decision making technology in agriculture and
direction information of gradient image thinning after the animal husbandry, by industry innovation talents team of
binarization processing. The experimental results show that Inner Mongolia Autonomous Region.
this algorithm overcomes the disadvantages of traditional
Sobel operator edge detection, such as rough edge detection, REFERENCES
discontinuity and other defects; it achieves a better edge [1] Li Xinfu, Liu Jiaomin. Edge Detection on Arc I mage of Low Voltage
detection effect. Apparatus. The Second International Conference on Machine
Learning and Cybernetics. November02-052003.
VI. CONCLUDING REMARKS [2] A geometric model for active contours in image processing [J].
Numerische Mathematik. 1994 (1), pp. 10-11.
According to comparisons among all kinds of first order
[3] Guanwang, Dingyoudong, weixiaocheng. Cultural relics image
operators, we choose the traditional Sobel operator ang retrieval based on improved Sobel operator [J].Computer technology
make a better improvement. From theory and experiment, it and development, 2011, 21(10), pp. 51-54.
proved that this algorithm is better than the traditional Sobel [4] Jun Xing. Digital image edge detection based on Sobel operator [J].
operator in image edge detection, and achieves the specific microcomputer development. 2005 (09), pp. 18-19.
accurate detection and reduces the loss of edge. The [5] De hai Shen, jian hou, xu E. Based on the improved Sobel operator
experiments show that the method provided in this paper is edge detection algorithm [J]. computer technology and development,
feasible. 2013,11, pp. 22-25.
[6] Wenbing Tao, Feng Chang, Liman Liu, Hai Jin, Tianjiang Wang.
Interactively multiphase image segmentation based on variational
formulation and graph cuts [J]. Pattern Recognition. 2010 (10), pp.
25-26.

TABLE I. TABLE

132

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy