Sie sind auf Seite 1von 6

Image Processing - Enhancement, Filtering and Edge Detection Using the Fuzzy Logic Approach

Ching-Yu Tyan and Paul P . Wang Department of Electrical Engineering Duke University, Box 90291 Durham, North Carolina 27708-0291
ABSTRACT Novel algorithms for the image enhancement, filtering and edge detection using the fuzzy logic approach are proposed. An enhancement technique based on various combinations of fuzzy logic linguistic statements in the form of IF...., THEN .... rules, modifies the image contrast and dynamic range of gray level, and provides a linguistic approach to image enhancement. Fuzzy filtering technique based on the tuning of fuzzy membership functions in the frequency d o n a i a results in an improved restoration of an image which is degraded by additive random noise. An improved performance compared with traditional mask convolution filtering is also evident from the SNR (signal-tenoise ratio) improvement of 4.03 dB. The fuzzy edge detection algorithm provides a variety of edge information. A comparison of fuzzy edge detection algorithm with some existing edge detection algorithms by human observers is also shown to reveal the novelty. I. INTRODUCTION In image enhancement, an image is enhanced by the way of modifying an images dynamic range or contrast. In this method, the gray scale of an image is modified according to a specific transformation[l]. The dynamic shape and the range of the histogram are crucial factors for a suitable transformation which is usually hard to be identified. For this reason, we introduce the fuzzy linguistic rules as an alternative to enhance the image instead of mathematical mapping being used in all known conventional approaches. In addition to the enhancement of images by contrast and dynamic modifications, it can also be enhanced by reducing degradations that may be present. In fuzzy image filtering, we discuss a technique using the fuzzy logic approach in frequency domain that attempts to reduce random noise. Edge detection is very useful in a number of contexts. Edges characterize object boundaries and are, therefore, useful for segmentation, registration, and identification of objects in scenes. Edge detection algorithms, which are quite useful in a br0a.d set of applications, have already been developed[2][3][4]. In
0-~803-0614-7/93$03.00 91993EEE

this paper, we introduce a new algorithm which provides different edge information simply by using tuning techniques in the fuzzy logic approaches. These are proven to be very effective in control system designs in the spatial domain, and also increase the flexibility of edge information.

I. IMAGE ENHANCEMENT I
An effective way to apply fuzzy logic in image enhancement is to process each pixel of an image on the basis of rules applied to the pixels. Let G be the number of gray levels in a image (G = 256). Then the membership functions of fuzzy set suitable for image processing can be defined in the universe of discourse U = [0, ....., G-1][5]. Let finl, n2) be the fuzzy variable representing the intensity value of the pixel of coordinates (nl,nz) in the source image and p(nl, n2) be the corresponding fuzzy variable in the resulting image after being enhanced. A fuzzy set A of universe of discourse U E U is characterized by a membership function uA, defined on U, taking values in the interval P l 1MIA = { ( U , A ) I U E U and A E [0, 11) (1) Then we define the fuzzy sets DARK, MED, and BRIGHT and their corresponding membership functions shown in Figure l(b). A very simple example of aggregation rules which causes a fuzzy reverse image (Figure-l(m)-(0)) via the human linguistic language approach rather is shown as the following: IF Anl, n2) is DARK, THEN p(nl, n2) is BRIGHT. IF Anl, n2) is MED, THEN p(nl, n2) is MED. IF finl, n2) is BRIGHT, THEN p(nl, n2) is DARK. Figure-l(a) shows an original image of 320
x 200 pixels, and Figure-l(c) shows its corresponding

histogram. Four possible sets of rules are given in Figure-l(d)(g)(j)(m) and their enhanced images are shown in Figure-l(e)(h)(k)(n). The differences can be seen from Figure-l(f)(i)(l)(o) a well as the original s image Figure-l(c).

III. IMAGE LOWPASS FILTERING


In order to reduce high-frequency noise while

600

also preserving the low-frequency component, lowpass filtering can be used to reduce a large amount of noise a t the expense of reducing a small amount of signal. A model of an image degraded by additive random noise is given by (2) fn(nl,n2) = A n 1 J n2) + n(nl,

gain, new- gain

where n(nl, n2) represents the signal-independent additive random noise. In order t o compare the performance among the original, degraded and processed images, some definitions are necessary[l]. We define the signal-to-noise ratio (SNR) as

PH Figure-2 Figure4

The normalized mean square error (NMSE) between the original image AnlJ n2) and the processed image p(n,, n2) is defined as

The SNR improvement shows the superiority of a fuzzy lowpass filter compared with a traditional mask convolution filter. Figure3(i) shows that the traditional lowpass filter has an SNR improvement of 1.65 dB with NMSE of 66.2%, whereas the fuzzy lowpass filter has an SNR improvement of 4.03 dB with NMSE of 36.59% as shown in Figure36).

IV. IMAGE EDGE DETECTION


where Var[.] is the variance. The SNR improvement due to processing is defined as SNR improvement In this section, we shall be making the use of three of the well known and popular edge detection algorithms: gradient algorithm, Laplacian algorithm and Sobels algorithm[8][9] and compare them against the fuzzy edge detection algorithm (Figure5(a)-(h)). An edge is the boundary between two regions with relatively distinct gray level properties, as shown in Figure-6, illustrates this concept. FigureG(a) shows an image of a light stripe on a dark background, where Figure-6(b) shows the opposite situation.

A 3 x 3 convolution mask h(nl, n2) used for traditional lowpass filter is shown in Figure-2. Figure3(a) shows an original noise-free image of 320x200 pixels, and Figure3(b) shows an image degraded by wideband Gaussian random noise a t an SNR of -1.26 dB with NMSE of 92.6%. The frequency response of a 3 x 3 convolution mask used for a traditional lowpass filter is shown in Figure-3(c). The frequency responses of a degraded image and a processed image by a traditional lowpass filter are shown in Figure-3(d)-(e).
Once we have the frequency information, we can apply the principle of fuzzy logic in designing a lowpass filter by designating frequency and gain components as fuzzy variables. The matrix in Figure4 rules modeling the represents a set of IF ...., THEN lowpass filter. As usual, Z, L, H, NH, and PH are fuzzy sets. Since the phase component often preserves the intelligibility of the image, we focus on the magnitude component in this nature. We define the fuzzy sets NH, L, and PH for the frequency variable free, and their corresponding membership functions are shown in Figure-3(g). Similarly, we define the fuzzy sets Z, L, and H for the gain function gain for the original image and the gain function new-gain for the new image.

Figure-6(a)

Figure-G(b)

....

The idea of fuzzy edge detection is to detect the transition associated with the dark and the bright sides of the edge. There are four casea of a 2 x 2 mask where edge occurs,

601

changing the shapes of the fuzzy membership functions. This also proves that fuzzy algorithm serves better edge performance and provides more flexibility to edge information depending upon the need.

V. CONCLUSION
Where F11= Anl, n2) F 2 l = An1 - 1, 712)

F 1 2 = Anll n2 - 1) F 2 2 = f(nl - 1, 712 -- 1)

(6)

Then we define two fuzzy sets DARK(D) and BRIGHT(B) for four fuzzy variables F l l , F12, F21 and F22 and let p(nl, n2) be the fuzzy variable representing the image after the edges have been detected over the universe of discourse U = [0,....., G - I] (G = 256). The corresponding membership functions and the processed images are shown in Figure-5(e)-(h). The fuzzy rules for this fuzzy edge detection algorithm are shown below: Rule 1: IF F11 is D AND F l 2 is D AND F21 is D AND F22 is D, THEN p ( n l , n2) is I). Rule 2: IF F l 1 is D AND F l 2 is D AND F Z l is D AND F22 is B, THEN p ( n l , n 2 ) is D. Rule 3: IF F11 is D AND F12 is D AND F Z l is B AND F22 is D, THEN p(nl, n2) is D. Rule 4: IF F11 is D AND F12 is D AND F21 is B AND F22 is B, THEN p(nl, n2) is E. Rule 5: IF F11 is D AND F12 is B AND F 2 l is D AND F22 is D, THEN p ( n l , n2) is I). Rule 6: IF F l 1 is D AND F l 2 is B AND F21 is D AND F22 is B, THEN p(nl, n2) is E;. Rule 7: IF F l l is D AND F l 2 is B AND F21 is B AND F22 is D, THEN p(nl, n2) is 1 . ) Rule 8: IF F l l is D AND F12 is B AND F21 is B AND F22 is B, THEN p ( n l , n2) is 1. 1 Rule 9: IF F l l is B AND F l 2 is D AND F21 is D AND F22 is D, THEN p ( n l , n 2 ) is D. Rule 10: IF F11 is B AND F l 2 is D AND F21 is D AND F22 is B, THEN p ( n l , n2) is D. Rule 11: IF F11 is B AND F l 2 is D AND F 2 l is B AND F 2 2 is D, THEN p(nl, n2) is E;. Rule 12: IF F l l is B AND F l 2 is D AND F 2 l is B AND F22 is B, THEN p(nl, n z ) is D. Rule 3: IF F l l is B AND F l 2 is B AND F 2 l is D AND F22 is D, THEN p ( n l , n2) is B. Rule 4: IF F l l is B AND F12 is B AND F2.l is D AND F22 is B, THEN p ( n l , n2) is D. Rule 5: IF F11 is B AND F12 is B AND F2.1 is B AND F22 is D, THEN p ( n l , n2) is Cl. Rule 6: IF F11 is B AND F12 is B AND F2.t is B AND F22 is B, THEN p(nl, n2) is D. Obviously, rule4, rule6, rule11 and rule13 are used to detect bright lines. From Figure-5(e)-(h), we can easily observe that a variety of edge images with different thicknesses can be obtained by simply

In this paper, novel algorithms designed specifically for image processing using the fuzzy logic approach have been explored. All image information in spatial domain or frequency domain in image enhancement, filtering and edge detection can be represented by linguistic statements in natural language and the processing is performed by very practical and powerful f u z z y approximate reasoning. The processing performance relies on the fuzzy inference engine which has been demonstrated to be able to give better results than the traditional approaches. Experimentation using fuzzy logic algorithm leads to the conclusion that the adoption of fuzzy reasoning offers some significant advantages. This also proves that fuzzy logic theory is useful for the mutual exchange of information between a human and an image. This paper shows that it is possible to manipulate or to improve images via natural language making use of fuzzy logic methodology, hence the tasks can be accomplished with ease by an operator without demanding a sophisticated education background. Full scale research is currently underway, and the research report is expected to come out from our research laboratory in the future. REFERENCES
R.

C.

Gonzales

and

B.

A.

Fittes,

Gray

Level

Transformation for Interactive Image Enhancement, Mech. Mach. Theory, Vol. 12, 1977, pplll-122. T. Peli and D. Malah, A Study of Edge Detection Algorithms, Computer Graphics and Image Processing,

Vol. 20, 1982, PPI-20. G . S. Robinson, Edge Detection by Compress Gradient

Mask, Computer Graphics Image Processing. 6, 1977,


~~492-501.

R. M. Haralick, Zero Crossing of Second Directional Derivative Edge Detector, Robot Vision, SPIE 336, 1982, pp91-96.
H. J. Zimmermann, Fuzzy Set Theory and Its Applications, Kluwer Academic Inc., 1991, ppll-67. L. A. Zadeh, Fuzzy Sets, Information and Control, 1965, pp338-353. Jae S. Lim, Two-Dimensional Signal and Image Processing, Prentice Hall Inc., 1990, pp529-530. Ani1 K. Jain, Fundamentals of Digital Image Processing, Prentice Hall Inc., 1989, pp342-353. R. C. Gonzalez and R. E. Woods, Digital Image Proc., Addison-Wesley Company Inc., 1992, pp413-429.

21-

pird

200

300

IF Anl,n2) is DARK, is THEN p(nl,n2) DARK. IF A n 1 , n 2 )is MED, THEN p ( n l , n 2 ) is BRIGHT. I F Anl,n2) is BRIGHT, THEN p ( n l , n z ) is MED.

IF Anl,nz) is DARK, THEN p(nl,n2) MED. is IF Anl,n2) is MED, THEN p ( n l , n 2 ) is DARK. IF Anl,n2) is BRIGHT, THEN p ( n l , n 2 )is BRIGHT.

IF flnl,n2) is DARK, THEN p ( n l , n 2 )is MED. IF Anl,n2) is MED, THEN p ( n l , n 2 ) is BRIGHT. IF Anl,n2) is BRIGHT, THEN p ( n l , n 2 ) is DARK.
.,
I

xi04

IF Anl,n2) is DARK, THEN p ( n l , n 2 ) is BRIGHT. IF Anl,n2) is MED, THEN p(nl,n2)is MED. IF Anl,n2) is BRIGHT, THEN p ( n l , n 2 ) is DARK.

Figure-1. Image Enhancement: (a) Original image; (b) Membership functions for fuzzy image enhancement; (c) Histogram of original image; (d)-(0) Fuzzy rules, enhanced images and corresponding histograms.

603

i
gain

Figure-3. Lowpass Filtering Experiments,: (a) Original image; (b) Image with additive wideband Gaussian random noise a t SNR of -1.26 dB with NMSE of 92.6%; (c) Frequency response of a convolution-type lowpass filter; (d) Frequency response of degraded image; (e)-(f) Frequency responses after convolution lowpass filter and fuzzy lowpass filter; (g)-( h) Membership functions for fuzzy lowpass filter; (i) Image after convolution lowpass filter with NMSE of 66.2% and SNR improvement of 1.65 dB; (j) Image after fuzzy lowpass filter with NMSE of 36.59% and SNR improvement of 4.03 dB.

604

Figure-5. Image Edge Detection: (a) Original image; (b) Edge detection image by gradient algorithm; (c) Edge detection image by Laplaciara algorithm; (d) Edge detection image by Sobels algorithm; (e)(h)Fuzzy edge images with different membership functions.

605

Das könnte Ihnen auch gefallen