Image Filtering, Edge Detection, Edge Tracing Using Fuzzy Reasoning
Image Filtering, Edge Detection, Edge Tracing Using Fuzzy Reasoning
5, MAY 1996 48 1
Abstract-We characterize the problem of detecting edges in images as a fuzzy reasoning problem. The edge detection problem is
divided into three staged: filtering, detection, and tracing. Images are filtered by applying fuzzy reasoning based on local pixel
characteristics to control the degree of Gaussian smoothing. Filtered images are then subjected to a simple edge detection
algorithm which evaluates the edge fuzzy membership value for each pixel, based on local image characteristics. Finally, pixels
having high edge membership are traced and assembled into structures, again using fuzzy reasoning to guide the tracing process.
The filtering, detection, and tracing algorithms are tested on several test images. Comparisori is made with a standard edge
detection technique.
1 INTRODUCTION
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
482 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL 18, NO 5, MAY 1996
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING U$;ING FUZZY REASONING 483
4
gradient measurement technique is illustrated in Fig. 3.
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
Image added error error after Gauss error after fuzzy Gauss
per pixel SNR per pixel SNR i m p per pixel SNR imp. (dB)
Fig. 4 10.0 15.5 71 ( ~ = 0 5 ) 2.45 2.40 10.4
Fig 5-1 10.0 15 5 9.1( g = 04) 0.58 0.61 84
Fig. 5-2 10 0 15.5 8 0 ( g =0 5) 1 40 2.64 91
Fig. 5-3 10.0 15.5 7.9( 0 = 0.5) I .40 2 78 85
having an average value of 10.0 to each pixel (Fig. 4b), cor- (all (hi) (Cl) (dl)
ues of 0 and evaluated the result (Fig. 4d) when compared (a2J (C2) (d2)
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 485
gradient direction
'\\\,\yl -\uniformity
evaluation
regions
Fig. 7. Corners and triple points do not satisfy a refined edge definition
processing stage.
To identify the degree of membership in the fuzzy sets
edge, coyner, and triple, we examine several local shape pa-
rameters. We have found that gradient, symmetry, and
straightness are useful parameters for this purpose. An
ideal edge point along a straight segment will have high
gradient, high reflective symmetry, and a high level of
straightness in a local neighborhood of pixels. An ideal cor-
ner point will have high gradient, high reflective symmetry,
but a low level of straightness in a local neighborhood of
pixels. An ideal triple point will have high gradient, low
symmetry, and a low level of straightness in a local neigh-
borhood of pixels. These ideas are summarized in Table 4.
TABLE 4
EDGEFUZZYMEMBERSHIP
RULES
Fig. 6. Filtering applied to Lena image (a) original image, (b) partial 3D grad- sym- straight-
view, (c) fuzzy filtered, (d) partial 3D view, (e) Gaussian filtered, IS = 0.4, ient metry ness
(f) partial 3D view, (9) Gaussian filtered, IS=1 .O, (h) partial 3D view. low low low
low low high
low high low
3 DETECTION low high high
high low low high
3.1 Edges, Corners, Triples high low high high
high high low
The edge detection problem necessitates an adequate char- high high high
acterization of an edge. Intuitively an edge corresponds to
significant intensity change in an image. This leads to at- Gradient (magnitude) was determined as in the previous
tempts to detect edges by locating local gradient maxima. section, i.e., as a difference in averages of neighboring re-
Unfortunately, because of various image phenomena, such gions, with the gradient direction selected for the highest
as noise or distortion from various sources, this is a poor degree of edgeness, as defined in Section 2.1.
definition for meaningful edge detection. To effectively Symmetry y was determined by reflecting pixels across a
characterize edges, we require a more effective definition line in the direction of the gradient passing through the
which identifies the various attributes of an edge. center pixel, and then comparing pixel values (see Fig. 8).
A more refined definition for an edge would appear to Comparisons are made for all possible pixel pairs which fall
be a point of high gradient between two uniformly flat re- in the region of evaluation, which is an n x n square. The
gions. Such a definition excludes many undesirable would- sum total of differences for all pairs of compared values is
be edge-points (such as noise), but may also exclude several then used as a measure of symmetry, y. To make y a posi-
points which are important in edge structures. Namely, tive value which increases with symmetry, we subtract it
such points occur as sharp corners and triple points. In from the largest possible value.
other words, corners and triple points may be points of nl2 n12
high gradient, but may not satisfy the condition of uniform (5)
flatness on either side of the edge point, as shown in Fig. 7
(continuous case shown).
where plly is the value of the reflected pixel across the line
Consequently, it is useful to detect corners and triple
points separately from edge points which occur along rela- in the direction of the gradient.
tively straight segments. Yet, at such an early stage of proc- Straightness t is defined similarily to symmetry, except
essing, we cannot definitely say whether a point is an edge, that pixels are translated rather than reflected (see Fig. 9).
a corner, or a triple point. Therefore, we chose to assign Pixels are translated a random distance in the edge direc-
fuzzy membership values to each pixel for each category. tion, within a limited range so as to fall within the region of
This allows us to delay confident identification until a later evaluation. Again, comparisons are made for all possible
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
486 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL 18, NO 5, MAY 1996
pixel pairs which fall in the region of evaluation. The sum 3.2 Experimentation
total of differences for all pairs of compared values is then
We used the impleme
used as a measure of straightness, t. To make t a positive
relations of Table 4, gen
value which increases with symmetry, we subtract it from
represent edgeness, corne
the largest possible value.
(6)
<\
pixel plane in direction images. Fig. 20 shows the algor1
of consideration
version of the well-known Lena i
pixel
/
region for
symmetry
evaluation
dividing line for
symmetry evaluation
(=gradient direction)
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 487
ness plane is also less pronounced than the tripleness plane between two segments at a triple point (one end
simply because corners tend to occur less frequently than point, one mid-point)
triple points in real images. which are illustrated in Fig. 12.
AND JOINS
4 TRACING
The algorithm of the previous sections produces four
planes of information, one for each of edgeness, cornerness,
tripleness, and direction. In this section, we present an al-
gorithm for tracing edge segments and for assembling edge
segments into larger structures based on the information in
these four planes.
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL 18, NO 5, MAY 1996
intersection
low low I low
low high low
high low low
high high high
Fig 13 Final results of edge detector (a) basic edge skeleton, (b) with
short lines (< 3 pixels) removed, (c) with joins completed, (d) with un-
connected lines removed
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
~-
LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 489
brim of the hat in the Lena picture. During the tuning of the
joining program, we noticed a tendency for parallel edges
to cross over and fuse to their neighboring edge. These
cases are especially difficult to resolve since they are weak,
yet closely located distinct sets of information. The weak-
ness of the data produces gaps in the tracing of such edges,
and makes joining a sensitive process.
This dilemma suggests that a specialized detector for
nearby parallel edges would be useful. Furthermore, our
joining process results in some joins which are not intuitive,
as can be seen in the eyes and hair of the Lena image. The
decision of whether to join or not to join is linked to the
Fig. 15. (a) original image, (b) after filtering, detection,tracing, and joins. broader object recognition problem, and the problem of
recognizing unfamiliar patterns in images.
5 RELATEDRESEARCH
Fuzzily controlled filters are related to the steerable filters
proposed by Freeman [5], [61. Other fuzzy research applied
to image processing include Pan and Kink 1191 who have
used the concept of fuzzy sets in order to enhance the con-
trast between successive regions in x-ray images. In re-
search by Bezdek [ll, fuzzy versions of c-means clustering
have been developed, and [29] shows an application to as-
tronomical images, while Jung et al. [ l l ] show an applica-
(a) (b)
tion for classifying images of tire treads. Bezdek 121 also
Fig. 16. (a) original image, (b) after filtering, detection, tracing, and joins. describes fuzzy learning vector quantization clustering algo-
rithms with an application to image segmentation. Kim et al.
[12] apply fuzzy logic towards edge relaxation in the prob-
lem of connecting detected edge segments. A nonfuzzy tech-
nique for dealing with imperfect and incomplete data in im-
ages have been developed by Rao and Nevatia [23]. Since our
research also uses simple textural statistical information
(treated in a fuzzy way), it can be related to the various sta-
tistical work summarized by Reed and Hans du Buf [24].
Regarding edge detection in general, a large number of
papers have been published. A discussion of edge detection
methods can be found in Heijden [9], which includes refer-
ences to several prominent and recent papers in the field.
(a) (b) A fuzzy edge detection technique was also introduced
by Tao and Thompson [27]. In this technique, sixteen possi-
Fig. 17. (a) original image, (b)after filtering, detection, tracing, and joins. ble edge structures in a 3 x 3 area are considered, and fuzzy
edge membership is determined by fuzzy if-then rules. Af-
ter redundant edge pixels are discarded, remaining edge
pixels are thresholded based on a noise factor. Filtering and
enhancement possibilities are not considered.
A fuzzy filtering and edge detection technique was in-
troduced by Tyan and Wang [28]. Tyan and Wang use
fuzzy rules for contrast enhancement, requiring arbitrary
definitions of dark and bright pixels, which the authors
admit require adjustment by a human operator. Images are
further enhanced by an interesting fuzzy low-pass filter.
The edge detection scheme also relies on arbritary dark and
bright definitions (again requiring user adjustment), and
operates on a 2 x 2 area. A single test image is presented.
Fig. 18. (a) original image, (b) after filtering, detection, tracing, and joins. Neither of the techniques in [271 and [28] acknowledge
the possibility of various edge shapes such as corners and
triple points, leaving gray-level differences among immedi-
In many cases, close parallel edges appear due to shad-
ate neighbors as the only determining factor in edge extrac-
ows or subtle object shape, as seen in the thickness of the
tion. Furthermore, in both techniques edge direction is ig-
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
490 I€€€ TRANSACTIONS ON P A I T E R N ANALYSIS AND MACHINE INTELLIGENCE, VOL 18, N O 5 MAY 1996
APPENDIX
A
In this paper, the calculation of a fuzzy variable is as fol-
lows. A set of fuzzy rules are expressed as in Table A l . After the image has been filtered, the processed image
TABLE AI
p(n,, E,) has NMSE of
FUZZYRULES
EXAMPLE
result C
small
small The SNR improvement due to processing is given by
large slow
slow
SNR improvement = 10 log,,
First the fuzzy membership values, k, for A and B are de-
termined as shown graphically in Fig. Al.
which simplifies to
" P
~ P.,
" ....._.....................
O K
SNR improvement = 10log,,,
2 pa2....... -.-.................
x
4 00
To calculate the SNR alone, if f(n,, n2)is the original signal,
3 0.0 A' A and v(n,,n,) is the added noise signal
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.
LAW ET AL.: IMAGE FILTERING, EDGE DETECTION, AND EDGE TRACING USING FUZZY REASONING 49 1
ACKNOWLEDGMENT [25] R. Rodieck, “Quantitative Analysis of Cat Retinal Ganglion Cell Re-
sponse to Visual Stimuli,” Vision Research, vol. 5, no. 11/12, -pp.
_ 583-
601,1965.
This research was by the Japanese Ministry Of [261 R.J. Schalkoff, Digital Image Processing and Computer Vision-An
Education. The authors wish to thank the developers of the Introduction to Theory and Implementations, Chap. 6, -pp.
~ - 267-270.
Vista [22]program library which was used for this research. New York: John Wiley & Sons, 1989.
[27] C. Tao, W. Thompson, and J. Taur, “A Fuzzy If-Then Approach to
Edge Detection,” Puoc. Second IEEE lnt’l Conf. Fuzzy Systems, vol.
REFERENCES 11, pp. 1,356-1,360, San Francisco, 1993.
1281 C. Tyan and P. Wang, ”Image Processing-Enhancement, Filter-
J.C. Bezdek, Pattern Recognition with Fuzzy Objective Function Algo- ing and Edge Detection Using the Fuzzy-Logic Approach,” Proc
rithms. Plenum, 1981. Second Int’l Conf Fuzzy Systems, vu1 I, pp 600-605, San Francisco,
J.C. Bezdek, ”Prototype Generating Clustering Algorithms,” Proc. 1993
Fifth Int’l Fuzzy Systems World Congress, pp. XXXVI-XLIII, Seoul, [291 X L Xie and G. Bmi, ”A Validity Measure for Fuzzy Clustering,”
1993. I E E E Trans Pattern Analysis and Machine Intelligence, vol. 13, no. 8,
J.F. Canny, ”Finding Edges and Lines in Images,” Technical Re- pp 841-847,Aug 1991
port AI-TR 720, Massachusetts Artificial Intelligence Laboratory, 1301 L.A. Zadeh, ”The Concept of a Linguistic Variable and Its Appli-
June, 1983. cation to Approximate Reasoning-I, 11,111,” Information Science, 8,
P. Cavanaugh, ”What’s Up in Top-Down Processing?” Representa- 9,1975
tions of Vision: Trends and Tacit Assumptions in Vision Research, A.
Gorea. ed., pp. 295-304,1991, Todd W. Law (S’83) received the BEng
W., Freeman, ”Steerable Filters and Analysis of Image Structure,” (Honours) degree in electrical engineering from
PhD thesis, MIT, Cambridge, Mass., 1992. McGill University in Montreal, Canada, in 1987.
W. Freeman and T. Adelson, ”Steerable Filters,” Proc. Third Int’l From 1987 to 1990, he worked at Northern
Conf. Computer Vision, Osaka, 1990. 1-elecom Limited. In 1992, he received the MSc
R. Graham, “Snow Removal: A Noise-Stripping Process for TV degree from the Nagoya Institute of Technology,
Signals,” IRE Trans. Information Theory, vol. 8, pp. 129-144,1962, and is currently a doctoral candidate at that
W. Grimson, ”A Computer Implementation of a Theory of Hu- institution Mr. Law is a member of the Japanese
man Stereo Vision,” AI Memo 565, Artificial Intelligence Labora- Society for Information Processing.
tory, MIT, Cambridge, Mass., 1980.
F. van der Heijden, “Edge and Line Feature Extraction Based on
Covariance Models,” IEEE Trans. Pattern Analysis and Machine ln-
telligence, vol. 17, no. 1, pp. 69-77, Jan. 1995. Hidenori ltoh received a BSc degree from Fu-
G. Kanisza, Organization in Vision. New York: Praeger, 1979. kui University in 1969, and an MSEE degree in
S. Jung, S. Bae, Y. Kang, G. Park, and G. Kim, “Tire Tread Pattern 1971 and a PhD degree in 1974 from Nagoya
Recognition Using Hierarchical Fuzzy Pattern Matching AD- Ilniversity. From 1974 to 1985, he worked at
proarh,” Proc. Fiftvh Int’l Fuzzy Systems World Congress, P.; 1y7- Nippon Telephone and Telegraph laboratories,
130, Seoul, 1993. developing operating systems. From 1985 to
J.S.’Kim, H.S. Cho, and S.K. Kim, “An Edge Relaxation Method 1989, he worked at ICOT, the Fifth Generation
Based on Fuzzy Logic and Neural Network Theory,” Proc. Fifth Computer Project, developing knowledge base
Int’l Fuzzy Systems World Congress, pp. 143-146, Seoul, 1993. systems. Since 1989, he has been a professor
T. Law, H. Itoh, H. Seki, ”Filtering Images for Edge Detection at the Nagoya Institute of Technology, and is
Using Fuzzy Reasoning,” Proc. Third Int‘l Conf. Automation, Robot- currently head of the Department of Intelligence
ics, and Computer Vision, Singapore, 1994. and Computer Science. Dr. ltoh is a member of the Japanese Society
M. Levine, Vision in Man and Machine, Chap. 6, pp. 151-210. New for Information Processing
York: McGraw-Hill, 1985.
J.S. Lim, Two-Dimensional Signal and Image Processing, pp. 529-530.
Prentice Hall, 1990. Hirohisa Seki received the BEng, MEng, and
E.H. Mamdani, ”Advances in the Linguistic Synthesis of Fuzzy DrEng degrees from the University of Tokyo in
Controller,” lnt’l 1.Man-Machine Studies, vol. 8, no. 6, pp. 669-679, 1979, 1981, and 1991, respectively. He joined
1976. the Central Research Laboratory of Mitsubishi
D. Marr and E. Hildreth, ”Theory of Edge Detection,” Proc. Royal Electric Corporation in 1981 and engaged in the
Society, (London), ser. B, vol. 207, pp. 187-217,1980. research on artificial intelligence. From 1985 to
M. Nitzberg, D. Mumford, and T. Shiota, “Filtering Segmentation .I 989, he was with the Institute for New Genera-
and Depth,” Lecture Notes in Computer Science, G. Goos, J. Hart- tion Computer Technology (ICOT). Since 1992,
mannis, eds., Chaps. 1-3, pp. 1-49. Berlin: Springer-Verlag, 1991. he has been an associate professor in the De-
S.K. Pal, and R.A. King, ”On Edge Detection of X-Ray Images partment of Intelligence and Computer Science
Using Fuzzy Sets,” IEEE Trans. Pattern Analysis and Machine Intel- at Nagoya Institute of Technology. His current
ligence, vol. 5, no. 1, pp. 69-77,1983. research interests include logic programming, deductive databases
S.K. Pal, ”A Note on the Quantitative Measurement of Image and automated deduction. He is a member of ACM, IEEE Computer
Enhancement Through Fuzziness,” IEEE Trans. Pattern Analysis Society, IPSJ, and JSAI.
and Machine Intelligence, vol. 4, no. 2, pp. 204-208,1982,
P. Perona and J. Malik, ”Scale-Space and Edge Detection Using
Anisotropic Diffusion,” I E E E Trans. Pattern Analysis and Machine
Intelligence, vol. 12, no. 7, pp. 629-639, July, 1990.
A.R. Pope and D.G. Lowe, “Vista: A Software Environment for
Computer Vision Research,” Proc. IEEE CS Conf. Computer Vision
and Pattern Recognition, 1994.
K. Rao and R. Nevatia, ”Describing and Segmenting Scenes from
Imperfect and Incomplete Data,” CVGIP: Image Understanding,
vol. 57, no. 1, pp. 1-23, 1993.
T.R. Reed and J.M. Hans du Buf, “A Review of Recent Texture
Segmentation and Feature Extraction Techniques,” CVGIP Imape
Understanding, vol. 7, no. 3, pp. 359-372, May, 1993.
Authorized licensed use limited to: KTH THE ROYAL INSTITUTE OF TECHNOLOGY. Downloaded on September 24, 2009 at 12:06 from IEEE Xplore. Restrictions apply.