6
1 Recursive Edge-preserving Image Filter based on a Fuzzy Model C.H. Li, P.K.S. Tam Department of Electronic Engineering Hong Kong Polytechnic Abstract- I this paper, the problem of edge preserv- ing smoothing in image processing is tackled using a fuzzy framework. The gray value differences between neighbour pixels are modelled as fuzzy variables and a design rule based on human experience and the nature of the filtering process gives rise to an effective filtering algorithm. Ex- perimental results demonstrate the validity of the recursive fuzzy edge-preserving smoothing filter for both synthetic and natural images. I. INTRODUCTION Smoothing algorithms are widely used in the early stage of a vision system. Its purposes are of twofold. The ob- served data may be corrupted by noise of various sources and have to be smoothed before further processing. The data may contain features which are relevant to the prob- lem at hand and need to be smoothed to reduce the com- plexity for subsequent processing. Traditionally, smoothing is often accomplished by con- volving the data with a Gaussian kernel. However, such smoothing is often not ideal for processing of visual data which contain a lot of discontinuities. Those discontinu- ities are often not preserved in location and in strength in such smoothing. Thus, adaptive smoothing algorithms have been developed involving the design of special opera- tors which tailor fit the local characteristics of the partic- ular type of images. For example, Kuan et al.[l] proposed the locally linear minimum mean square error (LLMMSE) estimator to smooth out noise in fiat regions while retaining discontinuities. Ragarajan [2] proposed a model-based ap- proach for image filtering. Recently, advanced techniques based on modeling of differential equations and probabilis- tic considerations have been developed for solving the prob- lem[3],[4] which provide improved results in the area of edge-preserving smoothing. The fuzzy approach to image filtering has been inves- tigated by different researchers. In particular, Kundu [5] proposed the use of fuzzy measures for choosing the en- hancement operator for filtering. Kim [6] suggested the use of a fuzzy approach for finding the compatibility coef- ficients in relaxation filtering. Law [7] proposed to use a fuzzy tuning technique to control the degree of Gaussian This research work was supported by the Hong Kong Poly- technic Universiy and The Research Grant Comittee through project no. HKP98/95E. Email: [email protected], [email protected] University, Hong Kong. smoothing in the process of filtering. A common point in these approaches is the auxiliary nature of the fuzzy approach in aiding classical algorithms rather than an ap- proach developed centred on the fuzzy approaches. In this paper, it will be demonstrated that a fuzzy re- cursive scheme for filtering can be derived by considering the image filtering problem as a dynamic system. The set of gray values of the pixels in the image is the state of the system and the set of control rules are the filtering actions to be applied to the system. This is inspired by the im- mense success of fuzzy logic in control theory. The control actions can be derived from considerations on the nature of the filtering process and coding our experiences on the problem with the aid of the fuzzy methodology. 11. DYNAMIC SYSTEM APPROACH In setting up the fuzzy model of the edge-preserving fil- tering algorithm, the key steps are (i) the selection of the fuzzy variables, and their coding into fuzzy sets; (ii) design of control action. A. The fizzy set for absolute differences Although the gray level is the fundamental unit in the image, its selection as fuzzy variables seems intuitive and various fuzzy approaches have been proposed based on fuzzifying the gray values. In comparison, the values formed by the absolute Merences between two pixels cap- tures more meaningful information than the gray value of a pixel, eg. noise, smooth regions and edges are characterized by the concept of gray level Merences between neighbours rather than the absolute value of a single pixel. Thus the absolute difference between the gray values of two pixels is chosen as the hzzy variable. In the case of image pixels gray values, the whole dy- namic range is usually of 256 distinct gray values. In this range, a gray level difference of less than ten gray values is usually considered as small and is usually associated with small random noise or artifacts in the image. Such dif- ferences are generally not easily noticible. A pixel gray level difference of 10 to 30 is considered as medium. Such medium size gray level deference is often associated with random noise and there is some chance that an edge is lo- cated there. The gray value difference of more than 30 gray values is considered as large and usually corresponds to a step edge or arises from a large noise source. This parti- 0-7803-4863-X/98 $10.0001998 IEEE 1643

[IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

  • Upload
    pks

  • View
    215

  • Download
    3

Embed Size (px)

Citation preview

Page 1: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

1

Recursive Edge-preserving Image Filter based on a Fuzzy Model

C.H. Li, P.K.S. Tam Department of Electronic Engineering

Hong Kong Polytechnic

Abstract- I this paper, the problem of edge preserv- ing smoothing in image processing is tackled using a fuzzy framework. The gray value differences between neighbour pixels are modelled as fuzzy variables and a design rule based on human experience and the nature of the filtering process gives rise to an effective filtering algorithm. Ex- perimental results demonstrate the validity of the recursive fuzzy edge-preserving smoothing filter for both synthetic and natural images.

I. INTRODUCTION Smoothing algorithms are widely used in the early stage

of a vision system. Its purposes are of twofold. The ob- served data may be corrupted by noise of various sources and have to be smoothed before further processing. The data may contain features which are relevant to the prob- lem at hand and need to be smoothed to reduce the com- plexity for subsequent processing.

Traditionally, smoothing is often accomplished by con- volving the data with a Gaussian kernel. However, such smoothing is often not ideal for processing of visual data which contain a lot of discontinuities. Those discontinu- ities are often not preserved in location and in strength in such smoothing. Thus, adaptive smoothing algorithms have been developed involving the design of special opera- tors which tailor fit the local characteristics of the partic- ular type of images. For example, Kuan et al.[l] proposed the locally linear minimum mean square error (LLMMSE) estimator to smooth out noise in fiat regions while retaining discontinuities. Ragarajan [2] proposed a model-based ap- proach for image filtering. Recently, advanced techniques based on modeling of differential equations and probabilis- tic considerations have been developed for solving the prob- lem[3],[4] which provide improved results in the area of edge-preserving smoothing.

The fuzzy approach to image filtering has been inves- tigated by different researchers. In particular, Kundu [5] proposed the use of fuzzy measures for choosing the en- hancement operator for filtering. Kim [6] suggested the use of a fuzzy approach for finding the compatibility coef- ficients in relaxation filtering. Law [7] proposed to use a fuzzy tuning technique to control the degree of Gaussian

This research work was supported by the Hong Kong Poly- technic Universiy and The Research Grant Comittee through project no. HKP98/95E. Email: [email protected], [email protected]

University, Hong Kong.

smoothing in the process of filtering. A common point in these approaches is the auxiliary nature of the fuzzy approach in aiding classical algorithms rather than an ap- proach developed centred on the fuzzy approaches.

In this paper, it will be demonstrated that a fuzzy re- cursive scheme for filtering can be derived by considering the image filtering problem as a dynamic system. The set of gray values of the pixels in the image is the state of the system and the set of control rules are the filtering actions to be applied to the system. This is inspired by the im- mense success of fuzzy logic in control theory. The control actions can be derived from considerations on the nature of the filtering process and coding our experiences on the problem with the aid of the fuzzy methodology.

11. DYNAMIC SYSTEM APPROACH In setting up the fuzzy model of the edge-preserving fil-

tering algorithm, the key steps are (i) the selection of the fuzzy variables, and their coding into fuzzy sets; (ii) design of control action.

A . The fizzy set for absolute differences

Although the gray level is the fundamental unit in the image, its selection as fuzzy variables seems intuitive and various fuzzy approaches have been proposed based on fuzzifying the gray values. In comparison, the values formed by the absolute Merences between two pixels cap- tures more meaningful information than the gray value of a pixel, eg. noise, smooth regions and edges are characterized by the concept of gray level Merences between neighbours rather than the absolute value of a single pixel. Thus the absolute difference between the gray values of two pixels is chosen as the hzzy variable.

In the case of image pixels gray values, the whole dy- namic range is usually of 256 distinct gray values. In this range, a gray level difference of less than ten gray values is usually considered as small and is usually associated with small random noise or artifacts in the image. Such dif- ferences are generally not easily noticible. A pixel gray level difference of 10 to 30 is considered as medium. Such medium size gray level deference is often associated with random noise and there is some chance that an edge is lo- cated there. The gray value difference of more than 30 gray values is considered as large and usually corresponds to a step edge or arises from a large noise source. This parti-

0-7803-4863-X/98 $10.0001998 IEEE 1643

Page 2: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

2

tion is in accordance with the distributions of gray level differences in images where each range has a significant number of representatives. The concept of small, medium and large is coded in fuzzy notion represented by A,, A,,,, Al. The choice of membership function should not affect the processing and since the image computation involves a lot of pixels, a simple membership function would speed up the processing time, thus the trapezoidal membership func- tions is chosen. These functions are defined on the interval [0,255] as follows:

i f s 5 5 A,(z) = (20 - z)/15 if 5 < x < 20

if x 2 20 if either x 5 10 or 2 30

(x - 10)/5 if 10 < x < 15 Am(x) = { (30 - x)/5 if 25 < x < 30

1 if 15 5 x 5 25

Al(s) =

I: 0

i: (1)

if x 5 20 (x - 25)/5 if 20 < x < 40

i f 2 1 4 0

These grade level ranges can be easily adjusted to suit different image characteristics in different applications. It will be shown in the experimental section that by using a one single fixed range as shown above, the algorithm is capable of handling different noise ratios and different edge strengths.

B. Recursive updating

After the fuzzy variables are identified, the control ac- tions to be applied to the variables have to be designed. The aim of the filtering is to remove the artifacts and noises while retaining the edges. However, the presence of noise often makes the judgment of which is noise and which are edges to be difficult and ambiguous. Using the fuzzy notion of gray level differences; we can describe a set of actions that is to be applied on pixels pairs. For the gray level dif- ferences which are small, they are usually artifacts or small noises and a higher diffusion rate can be applied to them. For the medium type of differences, there is some chance that the pair forms an edge and some chance that the pair arises from noises only. For the large type of differences, the chance of such differences arising from an edge is the biggest and the smallest filtering rate should be applied.

The pixels of the image are lexigraphically indexed by the set S = (1, ..., m) where m is the number of pixels in the image. The gray values of the pixels are denoted by g = (91, ..., gm}. Let di3 denotes the absolute difference between the gray values of two neighbouring pixels i and j , i.e.,

dij = 1% - 9jl (2)

The absolute difference is fuzzified into grades of large, medium and small and the rate of diffusion is applied in

accordance to these different classes.

where X is the overall rate of diffusion and ps, p,,, and 01 are the diffusion rates of different classes. e.g X = 0.1, p, = 0.2, p,,, = 0.15 and pl = 0.1 The different gis,gil,gim are then combined using their fuzzy membership values, as follows :

The convergence criteria can be detected by measures of noisiness

111. RESULTS AND DISCUSSIONS A number of synthetic images have been generated to

test the performance of the algorithms. The first test im- age is generated using the piecewise constant properties. Both rectangles and circles of different gray values and dif- ferent sizes are included in the image. Circles are included since their edges contain segments of different directions and blocking artifacts in any specific orientation or size can be easily detected by looking at its circumference. The reference image is then corrupted with additive Gaussian noise of standard deviation 20.0. The performance of the recursive fuzzy filter is evaluated against the anisotropic diffusion technique which has very good edge-preserving properties. The evaluation criteria include measuring the mean squared errors, visual quality, number of iterations taken, and the quality of edges extracted.

Figure 1 shows a synthetic flat image and its corrupted version. Figure 2 shows the filtered image using anisotropic diffusion and the recursive fuzzy filtering. The anisotropic diffusion is applied 75 times and reaches the m.s.e. of 4.3. There are further gradual reduction in m.s.e. as more iter- ations are taken. The recursive fuzzy filter is iterated for 25 iterations and attained the minimum of 4.7, beyond which its m.s.e. start to rise again. In the flat image case, the anisotropic diffusion shows a better noise reduction capa- bility, especially if more iterations are taken. Visually the restored result of both algorithms are similar.

Figure 3 shows a synthetic sloped image and its cor- rupted version. Figure 4 shows the filtered image using anisotropic diffusion and the recursive fuzzy filtering. The anisotropic diffusion is applied 100 times and reaches the m.s.e. of 6.1. There is further gradual reduction in m.s.e. as more iterations are taken. The recursive fuzzy filter is iterated for 20 iterations and attained the minimum of 6.8, beyond which its m.s.e. start to rise again. In the sloped image case, the anisotropic diffusion shows a better noise reduction capability, especially if more iterations are taken. However, in this case, the anisotropic diffusion technique

1644

Page 3: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

50.

100.

150.

2 0 0

250

e

50 100 150 200 250

Fig. 1. (a) Synthetic flat image and (b) flat image contaminated with Gaussian noise of s.d. 20

introduces some artifacts to the restored results producing some banding effect. For the sloped image, the Canny edge operator is applied to the filtered images. Figure 5 shows the edges of the filtered image. The edges as detected by the anisotropic diffusion contains a lot of false edges and spurious edges when compared with the recursive fuzzy fil- tering.

The pepper image is also employed for testing the per- formance of the recursive fuzzy filter for a natural image. Since the pepper image contains gray values in a continu- ous gray scale with lots of overlapping boundaries, it can be used to depicts the performance of the algorithm’s perfor- mance in natural images. Figure 6 shows the pepper image and its corrupted version. Figure 7 shows the filtered image using anisotropic diffusion and the recursive fuzzy filtering. The anisotropic diffusion is applied 82 times and reaches the m.s.e. of 9.62. The recursive fuzzy filter is iterated for

Fig. 2. Smoothing results of flat image after applying anisotropic difhion and (b) recursive fuzzy filtering

3

the (a)

16 iterations and attained the minimum of 9.66, beyond which its m.s.e. starts to rise again.

The purpose of the experimental simulations is not to demonstrate exhaustively which algorithms gives the small- est m.s.e., since the parameters in each of the algorithms may need a lot of fine tuning for individual signal-to-noise ratio and to the particular type of images involved. Previ- ous work [SI [6][7] on fuzzy tuning would be helpful as an aid in finding the set of optimal parameters in the filter- ing algorithms. Besides the m.s.e. is often not a sufficient quality indicator for filter in image analysis. However the results clearly demonstrate the effectiveness of the recur- sive fuzzy filter.

Iv. CONCLUSION

In this paper, the recursive fuzzy filtering technique is de- veloped using some intuitive knowledge of edge-preserving filtering under the fuzzy framework. It demonstrates that

1645

Page 4: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

Fig. 3. (a) Synthetic sloped image and (b) flat image contaminated Fig. 4. Smoothing results of flat image after applying the (a) with Gaussian noise of s.d. 20 anisotropic diffusion and (b) recursive fuzzy filtering

simple and effective approaches to image filtering Can be accomplished using the fuzzy framework with great fiexi- bility. The results of the recursive fuzzy filter is comparable to non-fuzzy approaches.

[6] 3. S . Kim and H. S . Cho. A fuzzy logic and neural network approach to boundary detection for noisy imagery. f izzy Sets and Systems, 65:141-159, 1994.

[71 T. Law, mdenori Itoh, and Hirohisa bage filtering, edge detection, and edge tracing using h z y reasoning. XEEE Trans. Pattern Anal. Machine Intell., 18(5):481-491, 1996.

REFERENCES D. T. Kuan, A. A. Sawchuk, T. C. Strand, and Pierre Chavel. Adaptive noise smoothing filter for images with signal-dependent noise. IEEE "hns. Pattern Anal. Machine Intell., 7:165-177, 1985. A. Rangarajan, R. Chellappa, and Y. T. Zhou. A model-based approach for filtering and edge detection in noisy images. IEEE Trans. on Circuits and Systems, 37:140-144, 1990. P. Perona and J. Malik. Scale space and edge detection using anisotropic d i h i o n . IEEE Duns. Pattern Anal. Machine Intell.,

C. H. Li and C. K. Lee. Image smoothing using parametric re- laxation. Gmphrcal Models and Image Processing, 57:161-174, 1995. M. K. Kundu and S . K. Pal. Automatic selection of object en- hancement operator with quantitative justification based on fuzzy set theoretic measures. Pattern Recognition Letters, 11:811-829, 1990.

12:629-639, 1990.

1646

Page 5: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

5c

1 oc

1st

20c

2%

5

10

15

2c

25

50 100 150 200 2:

(4

I 1 1

50 100 150 200 2!

(b)

Fig. 5. Edges detected in restored image using (a) anisotropic difFu- sion and (b) recursive fuzzy filtering

Fig. 6. (a) Pepper image and (b) corrupted version contaminated with Gaussian noise of s.d. 20

1647

Page 6: [IEEE 1998 IEEE International Conference on Fuzzy Systems IEEE World Congress on Computational Intelligence - Anchorage, AK, USA (4-9 May 1998)] 1998 IEEE International Conference

6

Fig. 7. Smoothing results after applying the (a) anisotropic diffusion and (b) recursive fuzzy filtering

1648