Spectral design of weighted median filters admitting ... - CiteSeerX

9 downloads 0 Views 72KB Size Report
Abstract—A closed-form spectral optimization method for the design of weighted median (WM) filters admitting negative weights is presented. The algorithm is a ...
IEEE SIGNAL PROCESSING LETTERS, VOL. 8, NO. 12, DECEMBER 2001

313

Spectral Design of Weighted Median Filters Admitting Negative Weights Ilya Shmulevich and Gonzalo R. Arce

Abstract—A closed-form spectral optimization method for the design of weighted median (WM) filters admitting negative weights is presented. The algorithm is a generalization of Mallows’ theory for nonlinear smoothers that consists of first finding a set of positive weights for a WM filter whose sample selection probabilities are as close as possible to the coefficients of a corresponding finite impulse response (FIR) filter with the desired spectral response. The signs of the weights associated with general WM filtering structures are then coupled with the input samples prior to replication by the weight magnitudes. The spectral characteristics of these WM filters, designed under the proposed method, are shown to be very similar to those of the equivalent linear FIR filters and arbitrary spectral behavior can be achieved. Unlike their FIR filter counterparts, WM filters are robust to impulsive noise, as demonstrated by simulations. Index Terms—Impulsive noise, sample selection probability, spectral response, weighted median filter.

I. INTRODUCTION

M

ALLOWS’ spectral optimization of nonlinear smoothers has proven to be of great theoretical significance in providing simple design guidelines for nonlinear smoothers [1]. This has been the case, in particular, for weighted median smoothers, which have gained widespread use in a number of , the applications [2]. Given the input samples output of the weighted median smoother characterized by the is given by set of positive weights MEDIAN where

is the replication operator with

, i.e.,

Mallows’ theory shows that for “selection” nonlinear smoothers, such as WM smoothers, whose output is identical to one of the input samples, one can find a corresponding linear FIR smoother whose output is closest to that of the nonlinear smoother in the mean square error sense. The linear have been shown FIR smoother coefficients by Mallows to have an intimate relationship to the statistical Manuscript received August 7, 2001. The associate editor coordinating the review of this paper and approving it for publication was Prof. D. A. Pados. I. Shmulevich is with the Cancer Genomics Laboratory, M. D. Anderson Cancer Center, University of Texas, Houston, TX 77030 USA (e-mail: [email protected]). G. R. Arce is with the Department of Electrical and Computer Engineering, University of Delaware, Newark, DE 19716 USA (e-mail: [email protected]). Publisher Item Identifier S 1070-9908(01)11133-8.

characteristics of the corresponding nonlinear smoother [1]. In fact, the weights of the closest linear smoother satisfy for , where is the probability that the output value of the nonlinear smoother is is referred equal to the -th input sample . to as the -th sample selection probability (SSP) [3]. Sample selection probabilities have been used as a basis for designing stack smoothers as they give a measure of the filter’s detail preserving ability [4]. Since the sample selection probabilities of the closest linear smoother are nonnegative, the weights are nonnegative as well. Consequently, the linear FIR smoother closest to a WM smoother under analysis can only exhibit low-pass frequency characteristics. This limitation is not surprising as weighted median smoothers themselves only admit nonnegative weights. Recently, the class of weighted median filters admitting positive as well as negative weights has been introduced, overcoming the low-pass limitations of WM smoothers [5]. WM filters can be designed to have band-pass, high-pass, as well as low-pass frequency characteristics. The output of the weighted median filter characterized by the set of real-valued weights is given by MEDIAN

sgn sgn

(1)

where is again the replication operator, the weights are allowed to be positive or negative, and the signs of the weights are coupled with the input samples prior to replication by the weight magnitudes. There is no loss of generality by considering only integer weights, since any real-weight WM smoother is identical to some WM smoother with integer weights [6]. The design of these general weighted median filters, however, has been limited to adaptive filter optimization techniques where a desired training sequence is assumed available. Adaptive optimization methods are powerful and often adequate, but training sequences are not always at hand. Closed-form design methods for WM filters are needed, much like linear FIR filters rely on a number of closed-form spectral or statistical optimization methods. This paper focuses on precisely this goal, where we generalize Mallows’ theory so that weighted median filters admitting positive as well as negative filter weights can be spectrally optimized. The new method greatly simplifies the task of designing robust WM filters. Robustness is inherent in the WM filter structure whereas the weights are designed to mimic the spectral characteristics of an appropriately designed linear FIR filter.

1070–9908/01$10.00 © 2001 IEEE

314

IEEE SIGNAL PROCESSING LETTERS, VOL. 8, NO. 12, DECEMBER 2001

II. GENERALIZED MALLOWS’ ALGORITHM Mallows’ theory has been used to spectrally analyze a number of nonlinear smoothers including stack and weighted median smoothers. Thus, given a WM smoother with a fixed set of positive weights, the sample selection probabilities associated with the WM smoother are found through one of the methods introduced in [3]. A first method computes the positive Boolean function from the weights and the SSP’s are derived directly from the positive Boolean function representation of the WM smoother. A second and more direct method for finding the SSP’s is through generating function representations. We briefly review this procedure as it is used in the proposed algorithm.

positive and negative weights, we first consider the synthesis problem for WM smoothers. Let us view (2)–(6) as a mapping from the -dimensional space of integers (representing weights) to the space of SSP vectors. Unfortunately, the mapping is not one-to-one, meaning that there are a number of weight vectors that can produce the same vector of SSPs. Therefore, the synthesis problem needs to be formulated as a constrained optimization problem. Given a vector , find the WM smoother weights of SSPs such that

A. Converting Positive Weights to SSPs Given a WM smoother with integer weights

is minimized under the constraint other words

for

. In

subject to

(7)

and letting (2) we define generating functions (3) . Each can be expanded into a polyfor nomial function of , where for each power of , some polynomial function of serves as its coefficient. Letting the coeffi, in be given by cient of (4) we construct a so-called combination matrix

with elements (5)

Finally, the -th SSP is equal to (6) There exist fast spectral algorithms for carrying out these calculations [7]. Having the SSPs at hand, the closest linear FIR smoother is characterized immediately by setting the tap coefficients equal to the SSPs. The spectral characteristics of the WM smoother under analysis are thus guaranteed to follow closely those attained by the linear FIR smoother. B. Synthesis of WM Filters Although this analysis of WM smoothers is useful, our goal is not only to apply Mallows’ theory for the analysis of WM filters whose weights are not restricted to be positive. Perhaps even more important is the synthesis problem, which is the design of a WM filter whose spectral response follows a predetermined spectral shape. Before considering the general case with

Of course, an objective function other than the -norm could be used instead. In order to implement the previous optimization problem, a number of available algorithms can be used, such as, for example, sequential quadratic programming [8]. The algoin (7) will be referred to as rithm used to obtain the values the Mallows’ Synthesis Algorithm. Our overall goal, however, is to be able to synthesize WM filters with positive and negative weights, starting from FIR filter coefficients. In other words, the objective is to obtain the corresponding WM filter whose spectral response follows closely that of the targeted linear filter. To this end, we perform the following steps. 1) Design the best -tap linear FIR filter satisfying a debe sired spectral response. Let the resultant linear FIR filter coefficients. Note that linear FIR filter taps are allowed to take on positive and negative values. The linear FIR filter design can be realized through a number of optimization tools readily available for linear filters. 2) Decouple the sign of the linear filter coefficients as sgn for . 3) Use Mallows’ Synthesis Algorithm to find the (positive) of the WM smoother weights whose sample selection probabilities are identical or as . In other words, close as possible to the coefficients . use (7) with 4) The weights of the WM filter having the desired spectral response are sgn

sgn

sgn

5) Given the set of input samples , the weighted median filter output is then computed as MEDIAN

sgn sgn

SHMULEVICH AND ARCE: SPECTRAL DESIGN OF WEIGHTED MEDIAN FILTERS

^ 9 W

Fig. 1. Comparison of the SSPs (dashed line) with the scaled magnitudes of the FIR high-pass filter coefficients (solid line).

315

Fig. 2. Power spectral density esimates for the high-pass linear FIR and WM filters.

The coupling of the signs of the FIR coefficients with the input samples is the main principle behind WM filtering with negative weights, as described in [5]. This allows us to use the standard WM smoother definition, containing only positive weights. In order for us to test this algorithm, we must choose several frequency selective linear filters and compare their performance with the corresponding WM filters. This is discussed in the next section. III. SIMULATION RESULTS As a first example, we selected a Daubechies decomposition high-pass filter with coefficients

Having applied the generalized Mallows’ algorithm to these coefficients, the resultant (positive) weights were

Fig. 3. Power spectral density esimates for the band-pass linear FIR and WM filters.

(8)

behavior. For this purpose, we designed an eight-tap band-pass filter with impulse response

Fig. 1 gives an indication of how close the SSPs corresponding to the weights in (8) are to the magnitudes of the FIR high-pass filter coefficients. For comparison purposes, the latter have been scaled so that their sum is equal to 1. The resulting -norm difference was 0.0582. In order to compare the resultant spectral behavior of the high-pass linear filter with the corresponding WM filter, the following analysis was performed. 50 realizations of 10 000 normally distributed, zero mean, unit variance random numbers were generated and used as inputs to the FIR high-pass filter as well as to the WM filter with (signed) weights ( , 8, , , 2, and 1). For each realization, the power spectral density (PSD) estimate using Welch’s method [9, p. 877] was computed. Finally, all of the 50 PSD estimates for each filter were averaged. The results are plotted in Fig. 2. As can be seen, the spectral behaviors of the compared filters are very similar. The WM filter, however, does not seem to attenuate the low frequencies as much as the linear filter. As another example, we have chosen to test how well the WM filter produced by the proposed method can follow band-pass

(9) The corresponding (signed) weights for the WM filter were (10) The same data and procedure were used as in the previous example. Fig. 3 shows the two spectra. Once again, it can be seen that the linear and WM filters behave very similarly from a spectral point of view. As a final test, we chose to compare the behavior of a linear filter and a WM filter in the presence of impulsive noise. We reasoned that in order to justify the use of a nonlinear filter for a frequency selective application, it must possess certain desirable properties that linear filters lack. One such property, common to median-type filters, is robustness to impulsive noise. For the choice of filter type, we selected the band-pass filters used in the previous example. As a signal, we chose a combination of two unit-amplitude sinusoids with frequencies 900

316

IEEE SIGNAL PROCESSING LETTERS, VOL. 8, NO. 12, DECEMBER 2001

Fig. 4. Comparison between linear and WM band-pass filters applied to a signal corrupted by impulsive noise. (a) Sum of two sinusoids (900 Hz and 2500 Hz) and impulsive noise; (b) spectum of (a); (c) output of FIR band-pass filter; (d) spectrum of (c); and (e) output of WM band-pass filter and (f) spectrum of (e).

Hz and 2500 Hz, with a sampling frequency of 10 000 Hz. This signal was then additively corrupted by impulsive noise with a probability of 0.1 of either a positive or negative impulse with magnitude five. A part of this signal is shown in Fig. 4(a). The spectrum of this signal is shown in Fig. 4(b) and is computed via the MUSIC eigenvector method [9, p. 915]. This signal was filtered by the linear FIR band-pass filter with coefficients given in (9). The output as well as its spectrum are shown in Fig. 4(c) and (d), respectively. As can be seen from the spectrum, the linear filter indeed removes the lower-frequency sinusoid, but at the expense of severely degrading the fidelity of the other sinusoid. This is quite evident by looking at the time-domain representation of the output. Then, the WM band-pass filter with weights in (10) was applied to the same signal. The output signal and its spectrum are shown in Fig. 4(e) and (f), respectively. It is clear that the WM filter is able to preserve the 2500 Hz sinusoid much better than the linear filter, while at the same time remaining robust in the presence of impulsive noise. IV. CONCLUDING REMARKS A spectral optimization method for designing weighted median filters admitting negative weights is presented. The method is direct, does not require a training sequence, and uses only FIR

filter coefficients as a starting point. While the latter can be designed by a variety of well-known methods for frequency selective applications, the resulting weighted median filters possess similar frequency selective behavior. Unlike linear filters, however, the weighted median filters are robust in the presence of impulsive noise, as supported by simulation results. As a final note, we would like to add that care must be taken in how we interpret the notion of “frequency selection” in the nonlinear domain. Unlike for linear filters, we have no simple superposition property enabling us to obtain the output of the filter by convolving the input with the impulse response. Therefore, the nonlinear filter’s spectral response is very much coupled to the input signal. This, perhaps somewhat ironically, is what allows some nonlinear filters to be quite robust to impulsive noise: while the impulse response of a nontrivial linear filter cannot be zero, even a simple median filter has a zero-valued impulse response. That is why, in order to get a general impression of the WM filter’s spectral behavior, we have decided to consider white noise inputs, i.e., all frequencies. Further studies are necessary to get an analytical handle on the relationship between the weights of the WM filter and its spectral behavior. ACKNOWLEDGMENT The authors would like to thank the Tampere International Center for Signal Processing, Tampere, Finland, where this work was done. REFERENCES [1] C. L. Mallows, “Some theory of nonlinear smoothers,” Ann. Statist., vol. 8, no. 4, pp. 695–715, 1980. [2] G. R. Arce and J. L. Paredes, “Image enhancement and analysis with weighted medians,” in Nonlinear Image Processing, S. Mitra and G. Sicuranza, Eds. New York: Academic, 2000. [3] M. K. Prasad and Y. H. Lee, “Stack filters and selection probabilities,” IEEE Trans. Signal Processing, vol. SP-42, pp. 2628–2643, Oct. 1994. [4] I. Shmulevich, V. Melnik, and K. Egiazarian, “The use of sample selection probabilities for stack filter design,” IEEE Signal Processing Lett., vol. 7, pp. 189–192, July 2000. [5] G. R. Arce, “A general weighted median filter structure admitting negative weights,” IEEE Trans. Signal Processing, vol. 46, Dec. 1998. [6] J. Nieweglowski, M. Gabbouj, and Y. Neuvo, “Weighted medians-positive boolean functions conversion,” Signal Process., vol. 34, no. 2, pp. 149–162, Nov. 1993. [7] S. Agaian, J. Astola, and K. Egiazarian, Binary Polynomial Transforms and Nonlinear Digital Filters. New York: Marcel-Dekker, 1995. [8] R. Fletcher, Practical Methods of Optimization. New York: Wiley, 1980. [9] J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 2nd ed. New York: Macmillan.

Suggest Documents