Morphological Edge Detection Algorithm Based On Multi-Structure Elements of Different Directions
Morphological Edge Detection Algorithm Based On Multi-Structure Elements of Different Directions
1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
ABSTRACT
Edge detection is one of the important pre-processing steps in image analysis. Edges characterize boundaries and edge
detection is one of the most difficult tasks in image processing hence it is a problem of fundamental importance in image
processing. Edges in images are areas with strong intensity contrasts and a jump in intensity from one pixel to the next can
create major variation in the picture quality. Edge detection of an image significantly reduces the amount of data and filters
out useless information, while preserving the important structural properties in an image. Conventionally, mathematical
morphology edge detection methods use single and symmetrical structure elements. But they are difficult to detect
complex edge feature, because they are only sensitive to image edge which has the same direction of structure elements.
This paper proposed a novel edge detection algorithm based on multi-structure elements morphology of eight different
directions. The eight different edge detection results are obtained by using morphological gradient algorithm respectively,
and final edge results are obtained by using synthetic weighted method. The experimental results showed that the proposed
algorithm is more efficient for edge detection than conventional mathematical morphological edge detection algorithms
and differential edge detection operators.
37
Volume 1 No. 1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
manipulating the features present in the image based on the image, the result of the watershed transform contains a
their shapes. The shape and the size of SE play crucial myriad of small regions, which makes this result hardly
roles in such type of processing and are therefore chosen useful. The use of a marker image [18] to reduce the
according to the need and purpose of the associated number of minima of the image and thus the number of
application. Usually, people use single and symmetrical regions is the most commonly used solution. Also
structure elements morphology to detect image edge. But interesting is the utilization of a scale space approach to
they are difficult to detect complex edge feature, because select the interesting regions using different filters
they are only sensitive to image edge which has the same (morphological operations [19], or nonlinear diffusion
direction of structure elements and are not so effective to [20]).
the edge which has the direction other than the structure Second is Sensitivity to noise, the Local
elements in [1, 2, 3].In this paper, a novel multi-structure variations of the image can change the result dramatically,
elements (MSE) morphology algorithm is proposed to this effect is worsened by the use of high pass filters to
detect the edge of image. estimate the gradient which amplify the noise. Third is
Poor detection of significant areas with low contrast
2. WATERSHED METHOD boundaries if the signal to noise ratio is not high enough at
the contour of interest the watershed transform will be
The watershed transform [12, 13] is a popular unable to detect it accurately.
segmentation method coming from the field of Furthermore the watershed transform naturally
mathematical morphology. The intuitive description of detects the contours with higher value between markers
this transform is quite simple: if we consider the image as which are not always the contours of interest and fourth is
a topographic relief, where the height of each point is Poor detection of thin structures, When the watershed
directly related to its gray level, and consider rain transform is applied on the gradient image the smoothing
gradually falling on the terrain, then the watersheds are the associated with gradient estimation together with usual
lines that separate the lakes called catchment basins that approach of storing gradient values only at the image pixel
form. positions rather than with sub-pixel accuracy make it
Generally, the watershed transform is computed difficult to detect thin catchments basin areas. Often this is
on the gradient of the original image, so that the catchment critical for successful segmentation of images.
basin boundaries are located at high gradient points. The
watershed transform has been widely used in many fields 2.2. Marker Algorithm
of image processing, including medical image
segmentation, due to the number of advantages that it The procedure can be enhanced by defining
possesses: it is a simple, intuitive method, it is fast and can markers for the objects to be extracted. These markers are
be parallelized [14, 15] and almost linear speedup was obtained by various means which is described as follows,
reported for a number of processors up to 64 and it Let R be the set of markers R i R i Where R is a
produces a complete division of the image in separated
connected components ( Ri Rj ) , i j ).
regions even if the contrast is poor, thus avoiding the need
for any kind of contour joining. Furthermore, several Consider the function g defined by g = (1-km )
researchers have proposed techniques to embed the Where u is the upper limit of the gradient m and KM
watershed transform in a multiscale framework, thus indicator function of R and the contours of the marked
providing the advantages of these representations [16, 17]. objects are watershed lines. This marking technique is
A simplest morphological water shed method is gradient Nonparametric and is simply based on the difference of
method. Contrast between the object and its border. The
Regularized gradient of size s of the function p is the
transform defined by the following procedure
2.1 Morphological Gradient
2.2.1. Algorithm
The morphological gradient m of a function f is
defined by:
m ( p ) [( p S ) ( pS )] Step1: Read gray level Image size of N XM.
(1) Step2: Compute Morphological Gradient hi
Step3: Erode hi with structuring element
Where ( p S )(i) Sup( p( j)) is the dilation of Si- 1. (Ei-1)
f at the point x and ( pS )(i ) Inf ( p ( j )) is the Step 4: Dilate Ei-1 with Structuring element Si+1. (Di+1)
Step5: Compute Difference of Morphologic al gradient, hi
erosion of f and S would be the detection of obstacles but and Di+1 (hi+1)
the main problem is structuring element applied on image. Step 6: Erode hi+1(ui )
Some important drawbacks have been exist, some most
important are as follows. This operation depends on size parameter. The
First is Over segmentation, when the watershed main advantage of this method is its ability to take into
transform infers catchments basins from the gradient of
38
Volume 1 No. 1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
account the variations of the initial function. The Let {F(m, n)} (m, n є Z) is a digital image, and
watershed of the supmax of ui (w) is less over segmented (m,n) is its centre, then structure elements in (2N+1) ×
than the watershed of h. This segmentation can now be (2N+1) square window can be denoted by:
used for extracting a coarse marker of the image. This Ai F(mm1, nn1),i i *,N m1,n1 N (5)
marker is obtained by selecting the catchments basin of w
located at the other end of the Image. This marker is Where i=1, 2, ----4N-1, α=180/4N, øi is the direction angle
smoothed and an outer marker is built in order to mark the
of SE
region of the image which does not belong to the image.
These Two markers are used to modify the gradient h. The In this paper, we choose N=2, then in the 5×5
divide lines of the modified gradient are the contours of square window, the direction angles of all structure
the object. Marker is a connected component in the image elements are ø= 00, 22.50,450, 67.50, 900, 112.50, 1350and
region and used in watersheds for edge detection. Image 157.50 And these structure elements are shown in Fig.1,
markers are obtained for image simplification. A where “1” denotes the components of SE. In fact, structure
simplified image S is built starting from the image F and elements Ai can be got by decomposing 5×5 square SE A
its gradient G(F). as shown in Fig.2. Therefore, Ai and A satisfies:
Let’s consider the minima M of G and let’s
define a function h as follows: A UAi (6)
h=F.PM where PM is the indicator function of M. Now
compute the reconstruction of h by dilation inside the
catchment basins. This operation produces an image where
each basin of gradient is valued. This valuation leads to a
simplified image s made of tiles of constant grey values.
This gradient will be null everywhere except on the divide
lines of g where it is equal to the absolute difference
between the grey-tone values of catchment basins CBi and Fig.1a Fig.1b Fig.1c
CBj separated by Gij.
Grad (Gij ) Fi F j (2)
X i (v) U j CB j (4)
The selection of structure element is a key factor Step1: pre process the Image to eliminate misclassified
in morphological image processing. The size and shape of regions in the image
SE decide the final result of detected edges. The basic
theory of multi-structure elements morphology is to
A 2*b c (7)
construct different structure elements in the same square
window and these structures elements comprise almost all
the line extending directions in the square window.
39
Volume 1 No. 1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
Where b and c are segment, can now be processed using the multi-structure
elements morphology of eight different directions. In these
b X i H i (F ) M images, the average gray scale of eight directions was
equalized to prevent biased segmentation results due to
leakage of the component through the filters. This method
c b max(abs (b x max ), abs(b x min ))
produced better results compared to traditional methods
Where Xmax and Xmin are the maximum and minimum gray like watershed, Sobel and canny edge detecting
values of mask and Hi (F) is the frequency of occurrence techniques. As per visual perception analysis the pixels
of Xi. misclassified as a third region at the image boundary are
removed by the proposed method. According to results
Step2: Construct structure elements Ai of different watershed, Sobel operators produced week edges for all
directions according to the method presented above. images and eliminated some important features in the
Step3: By taking the structure elements got in step2 images and discontinuity in the edge gray level intensities.
respectively to detect the edges Ei (F) of original image by Canny edge operator is more efficient for edge detection
morphological gradient edge detector. even though it produced poor edges for low contrast
Step4: Based on every detected edge Ei (F) in step3, use images and unimodel histogram images such as rose, eye
synthetic weighted method to calculate final detected edge and forest images which have been shown in the results.
by Canny is high sensitive to noise compare to other methods.
E ( F ) i 1Wi Ei ( F )
M
(8) The performance of novel method is almost all
same as on all test images. This method depends on
suitable selection of SE. The global threshold values of
Where E(F) is the possible detected edge of original various images according to the watershed method, Sobel
image, M is the number of structure elements and wi is operator, Canny operator and novel method are shown in
the weight of different detected edge information. It can be table1 and drawn the graph1. The values and graph
calculated by Wi = 1/M. explains that the novel method works better for noise and
complex images with optimal values for edge detection.
Step 5: To find fine edges divide original image by edge The novel method produced good and brighter edges by
image and multiply by its average in accordance with retaining important features in the images. This method
equation works smoothly even in complex structure, noise and
uneven illumination. Based on the results conclusions are
D( x, y) f ( x, y) E( x, y)* E1 ( x, y) (9) made.
Where
x, y – pixel coordinates
D-resultant edge image
E-edge image from step3
E1- average of edge Image E
The division of the original images by its average 1. Anshu a) Watershed b) Sobel
reveals the differences between these two images. Due to
image borders blur while average filtration the differences
are especially visible in case of edge whilst fire images
areas they are almost unrecognizable and which makes
image intensity equals original image average intensity so
the result of the division is regarded to be images of edges.
40
Volume 1 No. 1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
c) Canny d) Novel
c) Canny d) Novel
c) Canny d) Novel
c) Canny d) Novel
c) Canny d) Novel
c) Canny d) Novel
http://www.esjournals.org
REFERENCES
Table 1
[1] T. Chen, and Q. Wu, R. Rahmani-Torkaman, and J.
Hughes, “A pseudo top-hat mathematical
morphological approach to edge detection in dark
regions,” Pattern Recognition, vol. 35, no. 1, pp. 199-
210, January 2009.
42
Volume 1 No. 1, May 2011
International Journal of Information and Communication Technology Research
http://www.esjournals.org
[9] Daniel L. Schmoldt, Pei Li and A. Lynn Abbott, [20] Clark, A.A.; Thomas, B.T., “Evolving image
”Machine vision using artificial neural networks with segmentations for the analysis of video sequences,
local 3D neighborhoods”, Computers and Electronics Computer Vision and Pattern Recognition”, CVPR
in Agriculture, vol.16, 1997, pp.255-271. 2001. Proceedings of the 2001 IEEE Computer
Society Conference on, Volume: 2, 8-14 Dec. 2001.
[10] N. Senthilkumaran and R. Rajesh, “A Study on Split
and Merge for Region based Image Segmentation”, AUTHORS
Proceedings of UGC Sponsored National Conference
Network Security (NCNS-08) , 2008, pp.57-61. Dr C. NagaRaju received his B.Tech degree
in Computer Science from J.N.T.University
[11] N. Senthilkumaran and R. Rajesh, “A Study on Edge Anantapur, M.Tech degree in Computer
Detection Methods for Image Segmentation”, Science from J.N.T.University Hyderabad
Proceedings of the International Conference on and PhD in digital Image processing from
Mathematics and Computer Science (ICMCS-2009), J.N.T.University Hyderabad. Currently, he is working as a
2009,Vol.I, pp.255-259. professor & Head of IT in LakiReddy Bali reddy College
of Engineering, Vijayawada. He is professor incharge for
[12] A.N. Moga and M. Gabbouj,“ Parallel image systems department. He has got 15 years of teaching
component labeling with watershed transformation,” experience. He has published twenty six research papers in
IEEE Trans., Pattern Anal Machine Intel., vol. 19, pp. various national and international journals and about
441-450, May 1997. twenty eight research papers in various national and
international conferences. He has attended twenty
[13] J.M. Gauch, “Image segmentation and analysis via seminars and workshops.He is member of various
multiscale gradient watershed hierarchies,” IEEE professional societies like IEEE, ISTE and CSI.
Trans, Image Processing, vol. 8, pp. 69-79, 1999.
Sikhinam Nagamani received her B.Tech
[14] O.F. Olsen and M. Nielsen, “ Multi-scale gradient Degree in Information Technology from
magnitude watershed segmentation,” in ICIAP ’97-9th R.V.R& J.C College of engineering
Int. Conf. on Image Analysis and Processing, ser. Nagarjuna University, Guntur.M.Tech in
Lecture Notes In Computer Science. Berlin, Software Engineering from Godavari Institute of
Germany: Springer-Verlag, 1997, vol. 1310, pp. 6-13. Engineering and Technology. She is working as assistant
professor in the department of IT, LBRCollege of
[15] E. Dam and M. Nielsen, “Non-linear diffusion for Engineering, Mylavaram. She has three years of
interactive multiscale watershed segmentation,” in experience. She attended two conferences and five work
MICCAI 2000: Fourth International Conference on shops
Medical Image Computing and Computer-Assisted
Intervention, ser. Lecture Notes in Computer Science. G. Rakesh Prasad received his B.Tech Degree
Berlin, Germany: Springer-Verlag 2000, vol. 1935, in Information Technology from
pp. 216-225. LBRCollege of Engineering, Mylavaram.
M.Tech in Software Engineering from
[16] J.L. Vincent, “Morphological grayscale reconstruction LBRCollege of Engineering, Mylavaram. He is working
in image analysis: Applications and efficient as assistant professor in the department of IT, LBRCollege
algorithms,” IEEE Trans. Image Processing, vol. 2, of Engineering, Mylavaram. He has one year of
pp. 176-201, 1993. experience. He attended two conferences and five work
shops
[17] S.Beucher,“Watershed, hierarchical segmentation and
waterfall algorithm,” in Mathematical Morphology S.Sunitha received her B.Tech Degree in
and Its Applications to Image Processing, Dordrecht, Information Technology from V.R.
The Netherlands: Kluwer, 1994. pp. 69-76. Siddhartha College of engineering,
Vijayawada.M.Tech in Software Engineering
[18] J.Weickert,“Fast Segmentation methods based on from LBRCollege of Engineering, Mylavaram. She is
partial differential equations and the watershed working as assistant professor in the department of IT,
transform,”in Proc.DAGM Symp,1998,pp.93-100. V.R. Siddhartha College of engineering,Vijayawada. She
has five years of teaching experience. She attended two
[19] J. Sijbers, P.Scheunders, M. Verhoye, A. Van der conferences and four workshops.
Linden, D.Van Dyck, and E. Raman, “ Watershed-
based segmentation of 3D MR data for volume
quantization,” Magn. Reson. Image. ,vol. 15, pp. 679-
688, 1997.
43