Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Proceedings of the IEEE

International Conference on Automation and Logistics


Qingdao, China September 2008

Edge Feature Extraction Based on Digital Image


Processing Techniques
Feng-ying Cui and Li-jun Zou Bei Song
College of Automation and Electrical Engineering College of Automation and Electrical Engineering
Qingdao University of Science and Technology, Qingdao University of Science and Technology,
Qingdao 266042, China Qingdao, ShanDong Province, China
{cfy_angel & zlj105983}@163.com pipisongbei@163.com
ʳ
Abstract-Edge detection is a basic and important subject in
computer vision and image processing. In this paper we discuss II. IMAGE DENOISING
several digital image processing techniques applied in edge As we all know, the actual gathered images contain
feature extraction. Firstly, wavelet transform is used to remove
noises in the process of formation, transmission, reception and
noises from the image collected. Secondly, some edge detection
operators such as Differential edge detection, Log edge detection, processing. Noises deteriorate the quality of the image. They
Canny edge detection and Binary morphology are analyzed. And make image blur. And many important features are covered up.
then according to the simulation results, the advantages and This brings lots of difficulties to the analysis. Therefore, the
disadvantages of these edge detection operators are compared. It main purpose is to remove noises of the image in the stage of
is shown that the Binary morphology operator can obtain better pretreatment.
edge feature. Finally, in order to gain clear and integral image The traditional denoising method is the use of a low-pass
profile, the method of bordering closed is given. After or band-pass filter to denoise. Its shortcoming is that the signal
experimentation, edge detection method proposed in this paper is is blurred when noises are removed. There is irreconcilable
feasible.
contradiction between removing noise and edge maintenance.
Index Terms-Edge detection, digital image processing,
Yet wavelet analysis has been proved to be a powerful tool for
operator, wavelet analysis image processing [2]. Because Wavelet denoising uses a
different frequency band-pass filters on the signal filtering. It
I. INTRODUCTION
removes the coefficients of some scales which mainly reflect
The edge is a set of those pixels whose grey have step the noise frequency. Then the coefficient of every remaining
change and rooftop change, and it exists between object and scale is integrated for inverse transform, so that noise can be
background, object and object, region and region, and between suppressed well. So wavelet analysis can be widely used in
element and element. Edge always indwells in two many aspects such as image compression, image denoising
neighboring areas having different grey level. It is the result of [3][4], etc.
grey level being discontinuous. Edge detection is a kind of
method of image segmentation based on range non-continuity.
Image edge detection is one of the basal contents in the image
processing and analysis, and also is a kind of issues which are
unable to be resolved completely so far [1]. When image is
acquired, the factors such as the projection, mix, aberrance
and noise are produced. These factors bring on image feature’s
blur and distortion, consequently it is very difficult to extract Fig. 1 the sketch of removing image noises with wavelet transformation
image feature. Moreover, due to such factors it is also difficult
to detect edge. The method of image edge and outline The basic process of denoising making use of wavelet
characteristic's detection and extraction has been research hot transform is shown in Fig. 1, its main steps are [3][4] as
in the domain of image processing and analysis technique. follows:
Edge feature extraction has been applied in many areas 1) Image is preprocessed (such as the gray-scale
widely. This paper mainly discusses about advantages and adjustment, etc.).
disadvantages of several edge detection operators applied in 2) Wavelet multi-scale decomposition is adopted to
the cable insulation parameter measurement. In order to gain process image.
more legible image outline, firstly the acquired image is 3) In each scale, wavelet coefficients belonging to noises
filtered and denoised. In the process of denoising, wavelet are removed and the wavelet coefficients are remained and
transformation is used. And then different operators are enhanced.
applied to detect edge including Differential operator, Log 4) The enhanced image after denoising is gained using
operator, Canny operator and Binary morphology operator. wavelet inverse transform.
Finally the edge pixels of image are connected using the The simulation effect of wavelet denoising through
method of bordering closed. Then a clear and complete image Matlab is shown in Fig. 2.
outline will be obtained.

978-1-4244-2503-7/08/$20.00 © 2008 IEEE

2320

Authorized licensed use limited to: Holy Trinity Educational Society. Downloaded on September 25, 2009 at 01:29 from IEEE Xplore. Restrictions apply.
∂f ∂f ∂f
= cos α + sin α (1)
∂α ∂x ∂y

Under consecutive circumstances, the differential of the


∂f ∂f
function is df = dx + dy . The direction derivative of
∂x ∂y
function f ( x, y ) has a maximum at a certain point. And the
∂f ∂f
direction of this point is arctan[ / ] . The maximum of
Fig. 2 the comparison of two denoising methods ∂y ∂x
direction derivative is (∂f / ∂x) 2 + (∂f / ∂y ) 2 . The vector
Comparing with the traditional matched filter, the
high-frequency components of image may not be destroyed with this direction and modulus is called as the gradient of the
using wavelet transform to denoise. In addition, there are ∂f ∂f
function f , that is, ∇f ( x, y ) = ( , )' . So the gradient
many advantages such as the strong adaptive ability, ∂x ∂y
calculating quickly, completely reconstructed, etc. So the modulus operator is designed in the equation (2).
signal to noise ratio of image can be improved effectively
making use of wavelet transform. G[ f ( x, y )] = (∂f / ∂x )2 + (∂f / ∂y ) 2 (2)
III. EDGE DETECTION
For the digital image, the gradient template operator
The edge detection of digital image is quite important is designed as:
foundation in the field of image analysis including image
division, identification of objective region and pick-up of G[ f (i, j )] = [Δ x f (i, j )2 + Δ y f (i, j ) 2 ]1/ 2 (3)
region shape and so on. Edge detection is very important in
the digital image processing, because the edge is boundary of Where Δ x f (i, j ) = f (i, j ) − f (i − 1, j ) ,
the target and the background. And only when obtaining the
edge we can differentiate the target and the background. Δ y f (i, j ) = f (i, j ) − f (i, j − 1) .
The basic idea of image detection is to outstand partial Differential operator mostly includes Roberts operator
edge of the image making use of edge enhancement operator and Sobel operator.
firstly. Then we define the ‘edge intensity’ of pixels and
(1) Roberts operator
extract the set of edge points through setting threshold. But the
Roberts operator is a kind of the most simple operator
borderline detected may produce interruption as a result of
which makes use of partial difference operator to look for edge.
existing noise and image dark. Thus edge detection contains
Its effect is the best for the image with steep low noise. But the
the following two parts:
borderline of the extracted image is quite thick using the
1) Using edge operators the edge points set are extracted.
Roberts operator, so the edge location is not very accurate.
2) Some edge points in the edge points set are removed Roberts operator is defined as:
and a number of edge points are filled in the edge points set.
Then the obtained edge points are connected to be a line. G[ f ( x, y )] = {[ f ( x + 1, y + 1) − f ( x, y )]2 +
The common used operators are the Differential, Log, (4)
Canny operators and Binary morphology, etc. [ f ( x + 1, y ) − f ( x, y + 1)]2 }1/ 2

A. Differential operator But absolute deviation algorithm is usually used to predigest


Differential operator can outstand grey change. There are the equation (4) in practice. The following equations (5) and
some points where grey change is bigger. And the value (6) are the process of reduction.
calculated in those points is higher applying derivative
operator. So these differential values may be regarded as G[ f ( x, y )] ≈ f ( x + 1, y ) − f ( x, y )
(5)
relevant ‘edge intensity’ and gather the points set of the edge + f ( x, y + 1) − f ( x, y )
through setting thresholds for these differential values.
First derivative is the simplest differential coefficient. G[ f ( x, y )] ≈ f ( x + 1, y + 1) − f ( x, y ) +
Suppose that the image is f ( x, y ) , and its derivative operator (6)
f ( x, y + 1) − f ( x + 1, y )
is the first order partial derivative ∂f / ∂x, ∂f / ∂y . They
represent the rate-of-change that the gray f is in the direction The template of the Roberts operator is shown in Fig. 3.
of x and y . Yet the gray rate of change in the direction
of α is shown in the equation (1):

Fig. 3 Roberts operator

2321

Authorized licensed use limited to: Holy Trinity Educational Society. Downloaded on September 25, 2009 at 01:29 from IEEE Xplore. Restrictions apply.
(2) Sobel and Prewitt operator
To reduce the influence of noise when detecting edge, the
Prewitt operator enlarges edge detection operator template
from two by two to three by three to compute difference
operator. Using the Prewitt operator can not only detect edge
points, but also restrain the noise. The Sobel operator counts
difference using weighted for 4 neighborhoods on the basis of
the Prewitt operator. The Sobel operator has the similar
function as the Prewitt operator, but the edge detected by the
Sobel operator is wider.
Suppose that the pixel number in the 3 × 3 sub-domain of
image is as follows:
Fig. 6 the original image
A0 A1 A2
A7 f (i , j ) A3
A6 A5 A4

We order that X = ( A0 + A1 + A2 ) − ( A6 + A5 + A4 ) and


Y = ( A0 + A7 + A6 ) − ( A2 + A3 + A4 ) . Then Prewitt operator is
as follows:

G[ f (i, j )] = ( X 2 + Y 2 )1/ 2 (7)

Or G[ f (i, j )] = X + Y (8)

Prewitt operator is said in Fig.4 in the form of the


template.
Fig. 7 the edge detection drawing of Sobel operator

From the simulation drawing Fig. 7, we can know that


the edge position is very accurate. And the effect of Sobel
Fig. 4 Prewitt operator
edge detection is very satisfying. In a word, the Sobel and
Sobel operator can process those images with lots of Prewitt operators have a better effect for such images with
noises and gray gradient well. We order that grey level changing gradually and more noises.
X = ( A0 + 2 A1 + A2 ) − ( A6 + 2 A5 + A4 ) B. Log operator
and Y = ( A0 + 2 A7 + A6 ) − ( A2 + 2 A3 + A4 ) . Then Sobel The Log operator is a linear and time-invariant operator.
operator is as follows: It detects edge points through searching for spots which
two-order differential coefficient is zero in the image grey
G[ f (i, j )] = ( X 2 + Y 2 )1/ 2 (9) levels. For a continuous function f ( x, y ) , the Log operator is
defined as at point䯴 x, y䯵 :
Or G[ f (i, j )] = X + Y (10)
∂2 f ∂2 f
Δ2 f = + (11)
The template of the Sobel operator is shown in ∂x 2 ∂y 2
Fig.5.
The Log operator is the process of filtering and counting
differential coefficient for the image. It determines the zero
overlapping position of filter output using convolution of
revolving symmetrical Log template and the image. The Log
operator’s template is shown in Fig. 8.
Fig. 5 Sobel operator

The original image of cable insulation layer and the edge


detection drawing of Sobel operator gained using MatLab
simulation are shown in Fig. 6 and Fig. 7.
Fig. 8 Log operator

In the detection process of the Log operator, we firstly

2322

Authorized licensed use limited to: Holy Trinity Educational Society. Downloaded on September 25, 2009 at 01:29 from IEEE Xplore. Restrictions apply.
pre-smooth the image with Gauss low-pass filter, and then find symmetrical around the origin. Firstly we corrupt A with B
the steep edge in the image making use of the Log operator. recorded as AΘB = {x | ( B) x ⊆ A} , where ( B) x is a translation
Finally we carry on Binarization with zero grey level to give B along the vector. The interior of region is available
birth to closed, connected outline and eliminate all internal with AΘB . And A − ( AΘB) is the borderline naturally. Then
spots. But double pixels boundary usually appears using the
Log operator to detect edge, and the operator is very sensitive β ( A) is obtained. The equation of edge extraction can be said
to noise. So the Log operator is often employed to judge that β ( A) = A − ( AΘB) .
edge pixels lie in either bright section or dark section of the Structuring element is larger, the edge gained will be
image. wider.
C. Canny operator E. Simulative results analysis
The Canny operator is a sort of new edge detection In order to know about the advantages and disadvantages
operator. It has good performance of detecting edge, which has of these edge detection operators, we detect edge using these
a wide application. The Canny operator edge detection is to different operators respectively. The simulation results are
search for the partial maximum value of image gradient. The shown in Fig. 9 and Fig. 10.
gradient is counted by the derivative of Gauss filter. The
Canny operator uses two thresholds to detect strong edge and
original image Binary image edge extraction
weak edge respectively. And only when strong edge is
connected with weak edge, weak edge will be contained in the
output value. The theory basis of canny operator is shown in
equations (12)-(15).

Gauss: g ( x, y ) = exp[−( x 2 + y 2 ) / 2σ 2 ] (12)


Fig. 9 detecting edge with Binary morphology
Edge normals: n⊥ = ∇( g ∗ P) / ∇( g ∗ P ) (13)
original image roberts operator sobel operator

Edge strengths: Gn P = [ g ∗ P] (14)
∂n⊥

∂ ∂2
Maximal strengths: 0 = Gn P = [ g ∗ P] (15)
∂n⊥ ∂n⊥ 2

For two-dimensional imageˈcanny operator can produce


two information including the border gradient direction and prewitt operator canny operator log operator

intensity. Canny operator is actually using templates of


different directions to do convolution to the image respectively.
Then the mostly direction is taken. From the viewpoint of
positioning accuracy, canny operator is better than the other
operators.
Therefore, this method is not easily disturbed by noise Fig. 10 several edge detection algorithm comparison
and can keep the good balance between noise and edge
detection. It can detect the true weak edge. From the simulation results we can conclude that: the
D. Binary morphology effect of detecting edge with sobel operator after wavelet
Mathematical morphology is a new method applied in de-noising and with Binary morphology directly is better. So
image processing. The basic idea is to measure and extract the these two methods can be used. But finally we choose Binary
corresponding shape from image with structural elements morphology method based on specific measurement errors.
having stated form. So that the image processing and IV. BORDERLINE CLOSED
analyzing can be completed [2].
Using mathematical morphology to detect the edge is Although image is denoised before detecting edge, yet
better than using differential treatment. Because it is not noises are still introduced when detecting edge. When noise
sensitive to noise, and the edge extracted is relatively smooth. exists, the borderline, which is obtained using derivative
Binary image is also known as black-and-white image. The algorithm to detect image, usually produces the phenomenon
object can be easily identified from the image background. So of break. Under this situation, we need to connect the edge
we adopt the combination of binary image and mathematical pixels. Thus, we will introduce a kind of method closing the
morphology to detect edge. It is called Binary morphology. borderline with the magnitude and direction of pixels gradient.
Suppose that the region is shown in form of the set A. Its The basis of connecting edge pixels is that they have
border is β ( A) . B is an appropriate structure element, and it is definite similarity. Two aspects’ information can be gained

2323

Authorized licensed use limited to: Holy Trinity Educational Society. Downloaded on September 25, 2009 at 01:29 from IEEE Xplore. Restrictions apply.
using gradient algorithm to process image. One is the certain disadvantages always exist. For example, restraining
magnitude of gradient; the other is direction of gradient. noise and keeping detail can’t achieve optimal effect
According to edge pixels gradient’s similarity on these two simultaneously. Hence we will acquire satisfactory result if
aspects, the edge pixels can be connected. Specific speaking, choosing suitable edge detection operator according to specific
if the pixel( s, t ) is in the neighbor region of the pixel( x, y) situation in practice.
and their gradient magnitudes and gradient directions must
REFERENCES
satisfy two conditions (16) and (17) respectively, then the
[1] Lei Lizhen, Discussion of digital image edge detection method, Mapping
pixels in( s, t ) and the pixels in( x, y) can be connected. The aviso, 2006, 3:40-42.
closed boundary will be obtained if all edge pixels are judged [2] Lai Zhiguo, etc, “Image processing and analysis based on MATLAB” ,
and connected. Beijing: Defense Industry Publication, 2007,4.
[3] Chen Wufan, “Wavelet analysis and its application in image
∇f䯴 x䯸 y䯵 䯹∇f䯴 s䯸 t䯵 ≤ T (16) manipulation” ,Beijing: Science Publishing House, 2002.
[4] Kenneth RC, “Digital image processing[M]” , Beijing: Electronics
Industry Publication, 1998.
ϕ䯴 x䯸 y䯵 䯹ϕ䯴 x䯸 t䯵 ≤ A (17) [5] Wang Xiaodan etc, Image analysis and design based on
MATLAB-imagery processing [M], Xi’an: Publishing House of Xi’an
Where T is magnitude threshold, A is angle threshold. University of Electrical Science and Technology, 2000, 9.
[6] Ma Yan, and Zhang Zhihui, Several edge detection operators
V. CONCLUSION comparation, Industry and mining automation, 2004, (1): 54-56.
[7] Gao Cheng, and Lai Zhiguo etc, Image analysis and application based on
These edge detection operators can have better edge MATLAB, Beijing: Publishing House of National defence industry, 2007,
effect under the circumstances of obvious edge and low noise. 4: 133-175.
[8] Wang Zhengyao, Edge detection of digital image[Master paper], Xi’an:
But the actual collected image has lots of noises. So many Xi’an Jiaotong University, 2003.
noises may be considered as edge to be detected. In order to [9] Heung-Soo Kim and Jong-Hwan Kim. A two-step detection algorithm
solve the problem, wavelet transformation is used to denoise from the intersecting chords. Pattern Recognition Letters. 2001,
in the paper. Yet its effect will be better if those simulation 22:787-798.
[10] Canny J F. A computatioal approach tO edge detection[J]. IEEE Trans
images processed above are again processed through edge on PAMI, 1985, 8(6): 679-698.
thinning and tracking. Although there are various edge [11] Marr D. Theory of edge detection[J]. Proc Roy Soc, 1980, B(27):
detection methods in the domain of image edge detection, 187-217.

2324

Authorized licensed use limited to: Holy Trinity Educational Society. Downloaded on September 25, 2009 at 01:29 from IEEE Xplore. Restrictions apply.

You might also like