Sei sulla pagina 1di 13

882

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

Steerable Weighted Median Filters


Dimitrios Charalampidis, Member, IEEE
AbstractA lter is steerable if transformed (i.e., rotated, scaled, etc.) versions of its impulse response can be expressed as linear combinations of a xed set of basis functions. Steerability is important for numerous image processing applications. However, it is a property presently shared only by a specic class of linear lters. On the other hand, several classes of nonlinear lters, such as weighted median lters (WMFs), may offer certain advantages over linear lters such as robustness and edge preserving capabilities. In this paper, the concept of steerability is extended to encompass WMFs. It will be shown that, in general, a steerable WMF design technique needs to be capable of handling negative weights. Although methods that allow the design of WMFs admitting negative weights have already been proposed, such methods do not necessarily produce lters that are steerable, as opposed to the approach presented in this work. Experimental results illustrate the applicability of steerable WMFs in two applications, namely edge detection and orientation analysis.

I. INTRODUCTION

RDER statistics lters, including their special case, the median lter, and its modications [1][4], have attracted a great interest in the past few years, due to their usefulness in several applications of signal processing. In particular, median lters possess two important properties, namely edge preservation and noise attenuation. The latter mostly refers to the special case of impulsive noise [5]. Other order statistics lters, including the minimum and maximum lters, have been successfully used in morphological image processing as the erosion and dilation operators, respectively. The disadvantage of traditional order statistics lters, compared to linear lters, used to be their inexibility. For instance, linear smoothers can be implemented as weighted moving averages. Therefore, smoothing lters with different spatial and frequency characteristics can be obtained by choosing appropriate weights. In order to provide more exibility in the design of median lters, the weighted median lter (WMF) was introduced [6][8]. The WMF was proposed as an extension of the traditional median lter, and was designed by assigning a non-negative weight to each position in the lter window. Based on the same concept, weighted order statistics lters (WOSFs) were designed [9]. Later, methods for designing WMFs admitting negative and even complex weights were introduced [19][24]. Another advantage of 2-D linear lters was identied with the introduction of the steerability concept [10]. Considering , steerability implies that the output an input image

of a ltering operation using a lter oriented at angle can be computed as the linear combination of a nite outputs set of obtained by applying the same lter oriented in directions, respectively. Steerability has found applications in orientation analysis [11], image denoising [12], and texture analysis [13]. The concept of steerability was extended to include not only orientation, but also translations and scales [14], arbitrary compact transformations [15], and transformations within the context of Lie transformations groups [16]. In general, a linear lter parametrized by a vector is steerable if its impulse response can be obtained, for an arbitrary impulse responses, choice of , by a linear combination of parametrized by vectors . Although directional median lters have been used in the literature for image processing applications, including denoising [17], the authors are not aware of a framework that associates directional median lters and steerability. In this paper, the concept of steerability is extended to include WMFs. Steerable median lters (SMFs) are a special case of WMFs and inherent the noise-robustness and edge-preserving capability of WMFs. The advantages of SMFs over their linear counterparts as well as other WMFs are illustrated in the experimental results section. It should be mentioned at this point that the concept of steerability, as dened above, is not identical to the concept of steerability associated to multichannel processing [18]. In the latter case, processing is not performed across different orientations or translations, but across different channels, such as in the case of multispectral color or image processing. This paper is organized as follows. Section II introduces the SMF design method. In Section III, two applications of SMFs, namely edge detection and orientation analysis, are examined in more detail. Section IV presents experimental results that illustrate the effectiveness of SMF in edge detection, and orientation analysis. Section V concludes with some discussion. II. STEERABLE WEIGHTED MEDIAN FILTERS In what follows, we concentrate on the design of SMFs. The design of steerable WOSFs is a straightforward extension of SMFs. Subsection II-A presents some background and insights regarding WMFs admitting positive weights. Subsection II-B investigates the steerability property, and its applicability to existing WMF design methods admitting negative weights. Subsection II-C introduces the proposed SMF design approach. A. Weighted Median Filters Admitting Positive Weights

Manuscript received February 04, 2009; revised November 12, 2009. First published December 22, 2009; current version published March 17, 2010. The associate editor coordinating the review of this manuscript and approving it for publication was Dr. Michael Elad. The author is with the Electrical Engineering Department, University of New Orleans, New Orleans, LA 70148 USA (e-mail: dcharala@uno.edu). Digital Object Identier 10.1109/TIP.2009.2038823

This paper deals with 2-D ltering. However, the input samples and weights are represented as 1-D sequences in order to provide simplicity in notation. More specically, the coefcients or weights of a 2-D discrete, nite length function representing a 2-D image block or a 2-D lter can be rearranged

1057-7149/$26.00 2010 IEEE


Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

883

into an 1-D sequence by alligning all matrix columns into a single column. Spatial domain ltering, including median ltering, is performed by sliding a processing window horizontally and vertically, over the whole image, one pixel at a time. In what follows, the WMF design process will be explained using a single instance of the ltering operation where the processing window is centered at a particular image pixel. , the output of a Given the input samples weighted median lter characterized by the set of positive is given by weights (1)

Equation (6) implies that the median is the input sample value associated to the bin, , at which the CMF is greater than 0.5, , is while the CMF value at the immediately previous bin, smaller than 0.5. Based on the above discussion, we can draw a few important conclusions. First, it can be observed that if (5) and (6) are used for the calculation of the weighted median, then the weights do not have to be integer-valued. As a result, WMFs can be allowed to have the same exibility as their linear lter counterparts. Second, if the input values are integer valued, as in the case of images, then sorting of the input values is equivalent . to building the empirical PMF, which can be performed in B. Steerability and WMFs Admitting Negative Weights

where

is the replication operator dened as (2)

Alternatively, assuming that the input samples have been , the output of the sorted in an ascending order, weighted median lter is given by (3) where are the ordered weights corresponding to the sorted set of input samples. The total sum of weights is dened as (4) The cummulative sum is dened as (5)

The SMFs proposed in this work are WMFs whose associated weight masks can be expressed as a linear combination of weight masks associated to a xed set of WMFs. First, consider a set of parameters represented by vector , and a set corresponding to the sorted inputs of weights . Assume that the set of weights parametrized by an arbitrary vector can be expressed as a linear combinaweights, parametrized by vectors tion of a set of . In other words (7) Equation (7) describes a relation between weights, which is equivalent to the one satised by steerable linear lters. The CMF corresponding to vector is given by (8) Moreover, the total sum of the weights parametrized by vector is dened as (9) As indicated in (5), (8) is derived from (7) by cumulatively summing both sides of (7). For that purpose, the weights on both sides of (7) have to be ordered according to the input samples. It should be emphasized at this point that it is imperative that the sorting of input samples is independent of the parametrization, . Otherwise, although the bin associated with the weighted mean for weights may be determined from , the actual input sample to which this bin corresponds can only be determined after the input samples have been re-sorted according to the particular parametrization . The need for such re-sorting may nullify the computational advantage of steerable implementations. Yet, the dependence of input sample sorting on the parametrization is linked to another signicant problem that becomes apparent in the following discussion. In general, in order to be able to implement WMFs that resemble arbitrary linear lters, the set of weights has to include negative valued weights. The design of WMFs admitting negative weights has already been investigated. In [19], [20],

is the frequency with which the th sorted Essentially, sample, , occurs within the set of input samples. Therefore, is equivalent to the value of the th bin of the empirical probability mass function (PMF), and , as dened in (5), is the corresponding cummulative mass function (CMF). It should be mentioned at this point that the PMF and CMF may be constructed following two different approaches. Based on the rst approach, each individual input sample may occupy its own bin in the PMF. Based on the second approach, input samples having the same value, say , may occupy a single bin. In the latter case, the value of the PMF at the particular bin is calculated from the sum of the weights associated to all input samples having a value equal to . Both approaches lead to equivalent SMF designs. Thus, in what follows, it can be assumed that any of the two approaches has been used, unless it is stated otherwise. The weighted median value equals the value of the input sample that corresponds to the bin at which the CMF is equal to 0.5. In practice, the CMF may not be exactly equal to 0.5 at any bin. The weighted median output is given by (6)

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

884

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

TABLE I EXAMPLE ILLUSTRATING HOW STEERABILITY IS AFFECTED WHEN THE SORTING OF INPUT SAMPLES DEPENDS ON THE PARAMETRIZATION

and [23], the output of a weighted median lter with negative weights is dened to be

(10) Essentially, the weight signs are transferred to their corresponding input samples. However, the WMF denition of (10) is not appropriate in this work because the sorting of input samples depends on the weight values. A simple example conrms this statement. Consider two sequences and , and two sets of weights and . Although vectors and are used to distinguish between two different parametrizations, their actual relationship to the weight values is not relevant here. The sorted input samples under parametrization with and , respectively, are presented in Table I(a). Negative input samples indicate that their associated weights are negative. It can be observed that the sorting of the input samples depends on the parametrization. The weights ordered according to their associated sorted input samples are presented in Table I(b). The correspondence between weights under the two different parametrizations is presented in Table I(c) for both sequences. It can be observed that the weight correspondence differs for each sequence. If the two sets of weights and had to be linearly combined in order to produce a set of weights under a different parametrization, , as described in (7), then two different sets of values would

and once have to be determined, once for sequence for sequence . Therefore, the values would have to be redetermined for every image window processed. Another approach for designing WMFs as a linear combinations of other WMFs was introduced in [22]. The technique in [22] is capable of handling negative weights. For instance, in the case where a WMF weight mask contains both negative and positive weights, the WMF could be expressed as a combination of two or more WMFs. In the case where the WMF is expressed as a linear combination of two WMFs, the rst WMF weight mask would contain the positive weights, while the negative weights would be substituted by zeros. Similarly, the second WMF weight mask would contain the absolute value of the negative weights, while the positive weights would be substituted by zeros. In other words, the WMF operation would be expressed as , where and are positive constants and where

(11) In (11), is the unit step function. The technique is not applicable in this work since is a nonlinear function. Therefore, the linear relationship between weights in (9) does not hold. C. Proposed WMFs In this subsection, a new method for handling negative weights is proposed. First, let us consider a linear lter described by a set of noninteger coefcient weights .

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

885

Although it is not common, the output of the ltering output for a given set of input samples can be expressed as follows:

inal weights are used in the subsequent discussion. The corresponding CMF of the rst median in (15) is

(16)

(12)

where are integer-valued weights, and a large posi. The weights and tive constant so that the constant are used in order to be able to express the ltering operation in (12) using the replication operators (since the are noninteger-valued). This representation actual weights and does not result in a loss of generality since the weights the constant can be made arbitrarily large. The lter output can also be expressed as

As a reminder, the tilde implies that the weights and the sequence are ordered according to the sorted input samples . Coming back to the concept of steerability, using (7), the CMF for a set of weights parametrized by an arbitrary vector, , can be expressed as (17)

where it is implied that the offset sequence should be independent of the parametrization. Thus, the second weighted median in (15) is independent of the parametrization. Some manipulations lead to the following equation:

(13) (18) which can also be expressed as

where is a positive integer sequence used to guarantee that , are positive. In other words, all offset weights, . The noninteger version is dened as . Moreover, is dened of as (14)

(19) where

The Sum operators can be converted into Mean operators. For example, . A median-based lter associated with the lter of (13) can be obtained by replacing the Mean by the Median operator. Then, the WMF output admitting negative weights is dened as

(20)

The term in (19) can be itself considered to rep, resent a CMF, namely, where the superscript has, in this case, been used for consistency in the notation. More specically, using (16), (19) can be expressed as (21)

(15) In order to obtain the expression of (15), it was assumed that the Mean and Median operators admitting positive weights are equivalent when the sum of weights is equal to 1. This assumption was based on the fact that, in this particular case, the median and mean of a constant input sequence provide the same output, namely the value of an input sequence sample. are simply proporSince the integer weights , a WMF using eitional to the original weights ther set of weights produces identical results. Thus, the orig-

It can be observed that . Equation (21) implies that, if (7) holds, the CMF corresponding to a set of weights parametrized by an arbitrary vector can be expressed as a linear combination of CMFs. Therefore, the CMFs are steerable functions. The median can be determined by (6). Not all values need to be examined in order to determine the median. Using a . binary search, the median can be determined in

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

886

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

III. APPLICATIONS In this section, two applications of SMFs are presented, specically, edge detection (Section III-A) and orientation analysis (Section III-B). A. Edge Detection Consider a WMF oriented at direction described by the 2-D of size . The total number of weights weight mask . The parametrized set of weights is, therefore, equal to is equal to the 1-D column-wise reshaped version . The superscript, , is equivalent to the parameter of vector that appears in the equations of Section II. However, for the application presented here, a single parameter is sufcient for steering the WMF. For the purpose of edge detection, the function can be dened as follows: (22) where (23) is an isotropic Gaussian envelope with standard deviation . The function as dened in (22) is commonly used as a is linear lter in edge detection applications. Function steerable, since it can be expressed as (24) Therefore, the ordered weights associated to the samples can be expressed as sorted input

tation. The orientation that best identies an edge is the one at which the gradient is maximum. In other words, it is of in: the maximum possible weighted meterest to determine dian with respect to direction . An efcient approach for deis described next. First, the following discrete termining function is dened: (29) is equal to the minimum value of For each bin, , function with respect to all orientations . Function has the following properties. is a nondecreasing function of . 1) Property 1: Function and . Moreover, , then the value of the input sample Property 2: If cannot be the weighted median of that corresponds to bin the input sequence, for any value of . , then corresponds to a bin Property 3: If , for which . The proof of the three properties is presented in the Appendix. has the same properties as a PMF Property 1 implies that and, therefore, can be viewed as such as function. The three properties can be used to prove the following property: is equal to the input sample value correProperty 4: sponding to the th bin, for which the following two conditions and . There is only one bin are satised satisfying both conditions. The proof of property 4 is also presented in the Appendix. Essentially, property 4 implies that the maximum weighted median considering all possible orientations, , is the median value of a set of samples whose associated PMF is equal to . It should also be mentioned that although the four properties are presented for the case where the median lter weights are parametrized by the orientation variable , they are valid for any arbitrary parametrization, such as the one presented in Section II. In order to determine the maximum weighted median, a binary to check the validity search over bins, , can be performed on and . of conditions is dened as in (27) and (28), In the particular case where is dened as the discrete function (30)

(25) , introduced in (13) can be The positive 1-D sequence, obtained by rearranging the elements of the following 2-D isotropic function of size (26) . Therefore, It can be easily shown that . In this case, (21) can be expressed as (27) . By observing (20), and by using where the fact that the total sum of weights is zero regardless of the angle

(28) Considering that the function of (22) is a gradient detector, the output of the SMF provides the gradient at a particular orien-

A modication can be incorporated in (15), specically for the case of edge detection. The modication is explained with the help of Fig. 1. In this example, an edge separates two regions labeled 1 and 2, respectively. There are two sets of weights associated to the proposed lter output in (15), namely and . Each set of weights corresponds to a sliding window. It is assumed at this point that the two windows are moving upwards. The -window outputs a median value equal to the pixel values of region 1, up until the point shown in Fig. 1. Any additional shift outputs a median value equal to the pixel values -window outputs a median value of region 2. The equal to the pixel values of region 2, earlier than the -window.

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

887

Fig. 1. Example illustrating how the parameter p is determined.

Equation (15) denes the overall output as the difference of the two weighted medians. However, it can be observed that in -window order to obtain a single-pixel wide edge, the output needs to be equal to the value of region 2 earlier than -window for just a single shift, up to no more than two the shifts. This can be achieved by replacing the rst median in (15) with the th ordered value, where . The regions and include the -window values above the long and short dashed lines, respectively, as shown in Fig. 1. B. Orientation Analysis Steerable lters, including wedge lters [11], have been used in orientation analysis. The lter used in this section is described by the following function: (31) where the lters in (31) are angular harmonic lters
Fig. 2. Edge detection example: (a) original image, (b) using simple difference masks [ 1; 1]; [ 1; 1] , (c) using the function in (22) as a linear lter, (d) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (e) using the median lter in [21], (f) using the proposed lter.

(32) and where (33) The weights corresponding to the 2-D function are obtained by rearranging the elements of into an 1-D array. Each -dependent weight sequence can be made non-negative by adding a positive constant se. The weight sequence ordered according to quence, the sorted input sequence, associated to direction , is given by

, the CMF , and for

, can be expressed as in (21) for

(35) and

(36) IV. EXPERIMENTAL RESULTS In this section, experimental results showcase the advantage of steerable WMFs over their linear counterparts for two applications: edge detection and orientation analysis. A. Edge Detection In the experiments performed in this section, the grayscale value of edge pixels indicates their strength. It is assumed that image intensities range between 0 and 1. The size of the WMF , where is the weight mask is set equal to presented standard deviation of the Gaussian envelope in (22). As a reminder, function is used to describe the weight mask of a WMF lter oriented at direction . Moreover, as discussed in Section III-A, only the WMFs oriented at

(34) where the constant sequence has been included to ensure that the weights have no excess positive value (in other words, ). Observing (20) and using the fact that in this particular case

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

888

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

Fig. 3. Edge detection example: (a) image corrupted by impulsive noise, (b) using difference masks [ 1; 1]; [ 1; 1] , (c) using the function in (22) as linear lter, (d) using WMF followed by masks [ 1; 1],[ 1; 1] , (e) using the median lter in [21], (f) using the proposed lter.

Fig. 4. Comparison between proposed lter and WMF followed by masks [ 1; 1]; [ 1; 1] . The images to the left are the original corrupted by noise.

are needed for the extraction of edges. In order to perform comparisons between SMFs and their linear counterparts, the , oriented at 0 and is used as a exact same function, linear lter. More specically, if and are with the images produced by ltering the original image and , respectively, the image linear lters containing the edge magnitudes is commonly dened as (37) The subscript, , is simply used to indicate that the images are a result of processing using linear lters. Figs. 2 and 3 present edge detection results for a simple example to compare the performance of different approaches. Fig. 2(a) depicts the original image. Fig. 2(b) shows the edges and a detected using two simple masks, a horizontal vertical . Fig. 2(c) presents the edges obtained using and . It can be observed that linear lters closely located edges are not resolved for the particular stan. Fig. 2(d) presents the edges obtained dard deviation, using a WMF having a Gaussian weight mask as and dened in (23), followed by application of masks . Fig. 2(e) illustrates the results obtained by the median-based technique presented in [21]. This technique is based on the WMF approach admitting negative weights dened

Fig. 5. Vertical edge proles corresponding to the examples of Fig. 4.

in (10). As indicated in [21], since gradient masks consist of the same number of negative and positive weights, the lter output within a particular image window is simply equal to , where is the smallest pixel is the smallest value associated to a positive weight and value associated to a negative weight. Through a modication discussed in [21], the lter output can be dened as the minand , where imum between

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

889

Fig. 7. Edge detection example (Couple): (a) image corrupted by uniform additive noise, (b) using WMF followed by masks [ 1; 1],[ 1; 1] , (c) using the median lter in [21], (d) using the proposed lter.

Fig. 6. Edge detection example (Lena): (a) original image, (b) using simple difference masks [ 1; 1]; [ 1; 1] , (c) using the function in (22) as a linear lter, (d) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (e) using the median lter in [21], (f) using the proposed lter.

is the largest value associated to a positive weight, and is the largest value associated to a negative weight. The and its transpose 3 3 operator were used as masks. Nevertheless, only the signs and not the actual mask values are of relevance in this case, which is a disadvantage of the technique. Finally, Fig. 2(f) presents the edges detected using the proposed implementation. All techniques, and , except the linear lter approach using are capable of resolving closely-located edges. For the linear lter case, the edges shown are obtained via local maximum point detection in the direction of the gradient. No similar operation is required for the other methods since the gradient images do not contain wide edges. Fig. 3 presents a similar example in which the image has been corrupted by impulsive noise of probability 0.2 and uniformly distributed magnitude in the range 01. In other words, approximately 20% of the pixels in the original image have been replaced by a random value in the range 01. As expected, the high level of noise present renders the simple masks and ineffective, as illustrated in Fig. 3(b). Linear lters perform moderately well in rejecting noise, as shown in Fig. 3(c). However, they are still unable to detect closely located edges. This example demonstrates that, in order to effectively detect edges under noise conditions, lters require a relatively

Fig. 8. Edge detection example (Baboon): (a) original image, (b) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (c) using the median lter in [21], (d) using the proposed lter.

large spatial support depending on the level of noise present in the image. Nevertheless, linear edge detectors with large spatial support tend to blur image characteristics, including edges. The median-based lter in [21] also appears to be sensitive to noise, as indicated in Fig. 3(e). This is partially due to the small mask size; however, a larger mask may cause other problems as illustrated in a later example. On the other hand, the proposed

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

890

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

Fig. 9. Edge detection example illustrating the advantage of steerability: (a) original image, (b) using masks [ 1; 1]; [ 1; 1] , (c) using function in (22) as linear lter, (d) using WMF followed by masks [ 1; 1]; [ 1; 1] , (e) using the median lter in [21], (f) using the proposed lter.

Fig. 10. Orientation analysis example: (a) Original image, (b) lter used in orientation analysis. Orientation analysis using: (c) linear steerable lter, (d) SMF. Orientation transition analysis using: (e) linear steerable lter, (f) SMF.

lter and the WMF followed by masks and are capable of identifying edges, while effectively rejecting impulsive noise. Some local edge shifting occurs due to noise for all lters. Since the previous examples identied that the proposed lter and exhibit and the WMF followed by masks the best performance among the methods compared, their performance is further evaluated in Figs. 4 and 5. Fig. 4 presents edge detection results for four different vertical bar examples, namely for two different bar widths and two different types of noise (uniform additive of standard deviation 0.116, and impulsive of probability 30%). Fig. 5 shows the four corresponding vertical edge proles obtained by summing the edge image pixel values columnwise. The proles are zoomed around the edge locations. In Fig. 5, however, the vertical edge proles are presented for three different levels of noise. In the case of uniform additive noise, the standard deviations are 0 (thin black line), 0.058 (gray line), and and 0.116 (thick black line). In the case of impulsive noise, the probabilities are 0 (thin black line), 15% (gray line), and 30% (thick black line). The purpose of these examples is to illustrate that the proposed lter is more effective in removing noise (as shown in Fig. 4), while it results in

edges of at least the same magnitude and possesses the same capability in resolving closely located edges as the WMF foland . The noise present in the lowed by masks edge images produced by the competing WMF method may not appear to be signicant compared to the edge strengths, for the case of uniform noise. However, in this example, the intensity transitions dening the edges are the greatest possible. Noise results in more signicant problems in cases where weaker edges are present in the image, as shown in Fig. 7 discussed next. Next, some edge detection examples are presented for real images. Fig. 6 illustrates that all edge detection methods may be successful under noise-free conditions. However, it is well-established that linear ltering is not effective in removing impulsive noise. Fig. 7 compares the three median-based methods for the case where the image is corrupted by uniform noise. A 7 7 extended Sobel operator is used for the method in [21], in order to be able to better handle the presence of noise. Nevertheless, the intensity at the edges as well as the background has a blocky appearance. This is due to the fact that, as was described earlier, only the weight signs and not the particular lter weights are of importance for this method. The proposed lter appears to be the most successful in rejecting noise. Fig. 8

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

891

Fig. 12. Angular transition proles: (a) steerable linear lter, (b) SMF.

Fig. 13. Angular transition proles: (a) steerable linear lter, (b) SMF.

Fig. 11. Orientation analysis example: (a) Original image, (b) lter used in orientation analysis. Orientation analysis using: (c) linear steerable lter, (d) SMF. Orientation transition analysis using: (e) linear steerable lter, (f) SMF.

compares the three median-based methods for an image where there is naturally noise-like texture present. It can be observed that the proposed lter is the only one capable of ignoring the texture associated to fur such as in locations around the eyes, while nding all signicant edges. Fig. 9 illustrates an advantage of steerable versus orientation variant approaches. The particular image is selected since it contains edges at different orientations. Only the steerable linear lter using the function of (22) and the proposed method are able to correctly determine that all edges are of the same strength, regardless of their orientation. B. Orientation Analysis In this section, experimental results showcase the performance of the proposed SMFs in orientation analysis. In all of (31) is used as both the experiments, the function impulse response of linear lters and the weight mask of SMFs. Specically, the lters used in this subsection are dened as for , where , and zero otherwise. Orientation analysis is performed by applying a lter (linear or SMF) in orientations to obtain an angular pro. In the denition of le, it is assumed that if , then . Function is appropriate for capturing the intensity

characteristics around a specic image location. In order to obtain angular transition proles, the difference prole, is used. In what follows, it is assumed that image intensities vary . Moreover, in some cases, in the range [0,1], and images are depicted using a contrast different than the actual one, so that the superimposed angular transition proles can be clearly visualized. Fig. 10 shows an orientation analysis example. Fig. 10(a) depicts the original image, and Fig. 10(b) shows the lter used . in the experiments for a specic orientation, i.e., Figs. 10(c) and (d) present the angular proles, , for the steerable linear lter and the proposed SMF, respectively. Similarly, Figs. 10(e) and (f) present the angular transition pro, for the linear lter and the SMF, respectively. les, In this example, a total of lters are used. It can be observed that the SMF produces an angular prole whose values are closer to the actual image intensities over the angular range, compared to the linear counterpart. In particular, the original image shown in Fig. 10 has intensities approximately equal to 0.81, 1, 0.81, 0.62, and 1, for the angular ranges and , re, for SMF spectively. Furthermore, the angular prole, is capable of identifying sharp angular transitions. Accordingly, these observations are reected in the angular transition prole, , which is more accurate for the case of SMF. The steerable linear lter is unable to separate the two angular tranand . Fig. 10 conrms that median lters sitions at are superior to linear lters in retaining edges and fast transitions in images. In this work, this advantage is injected to the concept of steerability. inThe angular resolution of linear lters improves as creases. Fig. 11 presents the example of Fig. 10, but for . For this value of , the steerable linear lter can sepaand . Yet, the anrate the two angular transitions at gular prole produced by the SMF is more accurate even for

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

892

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

Fig. 14. Orientation transition analysis: Images corrupted by impulsive noise.

Fig. 15. Orientation transition analysis: Images corrupted by uniform noise.

. Fig. 12 presents the angular transition proles for , and demonstrates that the distance of the curve from the center indicates the strength of the angular transition. Although the linear lter is able to detect the signicant transitions, the transition strengths do not reect the true transition values, which are equal to 0.19, 0.19, 0.19, 0.19, 0.38, at , respectively. As shown in Fig. 13, angles , the angular prole for the linear steereven when able lters, although improved, is not as accurate as that of the SMF. It should be mentioned at this point that when orientation transition proles are superimposed on images, such as in Figs. 10(e), (f), 11(e), (f), and 1417, the proles are scaled appropriately for visualization purposes. In order to examine the performance of SMFs under noisy conditions, several angular transition proles are presented for the image of Fig. 10(a) when it is corrupted by impulsive noise of 30% probability (in Fig. 14), and uniform noise of standard deviation 0.058 (in Fig. 15). The SMFs are resistant to impul-

sive noise, while the linear lters appear to be more suitable for images corrupted by additive noise. Nevertheless, even in the case of additive noise, the SMFs are still capable of identifying the signicant transitions in the orientation transition proles, without producing false transition peaks. The latter is not true for linear lters when images are corrupted by impulsive noise. Fig. 16 presents orientation transition proles at several, randomly selected points around the edges of the Buttery image. The image has been corrupted by impulsive noise of probability 40%. Finally, Fig. 17 presents orientation transition proles at several, randomly selected points around the edges of the Peppers image. The particular image indicates that the majority of the SMF and linear lter proles are relatively similar. However, the proles produced by the linear lters had to be scaled twice as much compared to the proles produced by the SMFs since, as mentioned earlier, linear lters do not produce as accurate angular proles as SMFs.

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

893

Fig. 16. Orientation transition analysis at several points in Buttery image. The image has been corrupted by impulsive noise.

Fig. 17. Orientation transition analysis at several points in Peppers image.

V. DISCUSSION AND CONCLUSION In this paper, a steerable weighted median lter (SMF) implementation is proposed as an extension to weighted median lters (WMFs). The proposed work aims to join the advantages of median lters and steerable lters. It is well known that median lters are good at handling noise, and especially noise of the impulsive type, and at preserving distinctive image characteristics, such as edges. On the other hand, steerable lters provide computational efciency. In order to achieve the integration of the median and steerable concepts, a new WMF approach for handling negative weights is introduced. The goal of the proposed work is not to introduce a particular lter mask with characteristics which are optimal in some sense. Therefore, other lters instead of the ones used in the Sections III and IV could be used to exemplify the performance of SMFs. Nevertheless, the optimization of SMF weights for more general applications is an important aspect of lter design, and will be addressed in future work. Approaches such as the one presented in [23] will be investigated. It may be advantageous at this point to discuss the computational advantage of SMFs over nonsteerable WMFs. In some cases, such an advantage is apparent. For instance, in the case of edge detection application presented in Section III-A, only two WMFs are required for determining the median-based gradient magnitude. A nonsteerable implementation would require several gradient-based WMF operations applied at several orientations, in order to determine the maximum gradient. In the case

of orientation analysis presented in Section III-B, the computational efciency advantage of SMFs over nonsteerable WMFs may not be so obvious. In order to shed some light into this issue, assume that it is of interest to obtain the weighted median for numerous directions. The computational cost necessary for ordering the input samples may be disregarded as it is only performed once. Consider a single direction out of all directions of interest for which the weighted median will be computed. If the number of lter weights is equal to , a nonsteerable imaddition operplementation requires, in average, a total of ations in order to obtain the CMF from the PMF until the bin corresponding to the median is reached. Here, it was assumed that each input sample occupies its own bin in the PMF. If all equally-valued input samples occupy the same bin, assuming 256 intensity levels in the input image, there are 128 additions needed in average to obtain the CMF from the PMF. Howaddition operations are needed to popuever, an additional late the PMF. If each sample occupies its own bin, sorting of the input samples is more computationally expensive. Yet, as mentioned earlier, the time required for sorting may be ignored if the number of directions is large. The proposed SMF implementamultiplications and additions to linearly tion requires combine the CMFs for each bin. Since the median is determined bins need to be searched. directly from the CMFs, only Therefore, a total of operations is needed for the proposed SMF. In order to evaluate the difference, assume for a lter of size . that Then, a total of 512 operations is needed, in average, to com-

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

894

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

pute the output of a nonsteerable WMF, while a total of only 210 operations is required by the proposed technique. The savings increase as the lter size increases, which is when computational efciency is mostly necessary, and as the number of decreases. lters APPENDIX preNext, the proofs of the four properties of function sented in Section III-A are demonstrated. is nondeProof of Property 1: Property 1 states that creasing with . The proof of this property is straightforward. , which would invalidate the propAssume that erty. Considering that the orientation at which the minimum occurs is , the assumption would imply that . Since is a PMF the original assumption is invalid, thus . , from property 1 it can be Proof of Property 2: If . Therefore, it is not possible that concluded that or can be less than 0.5. In order for an input sample value th bin to be the weighted median for corresponding to the a particular orientation , the following two conditions should be both valid: and . Thus, if , then the value of the input sequence corresponding to bin cannot be the the weighted median of the input sequence, for any value of . Proof of Property 3: If , then for at least orientation for which is minimum. Since is nondecreasing with , a bin exists for which and . In other words, there exists a , corresponding to the weighted median, for at bin, , then the maximum least one orientation. Thus, if weighted median considering all possible orientations, , must correspond to a bin, , for which . , then Proof of Property 4: Property 2 states that if cannot the value of the input sequence corresponding to bin be the weighted median of the input sequence, for any value of . From properties 1 and 2, one can conclude that if , no bin greater than can correspond to the weighted median , value for any orientation, . From property 3, if then the maximum value of the weighted median with respect to all orientations corresponds to a bin greater or equal to . and the maximum value of Therefore, if the weighted median with respect to all orientations, , is equal to the input sample value corresponding to the th bin. Since, is nondecreasing with , there is only one bin satisfying both conditions.

[4] D. G. Karakos and P. E. Trahanias, Generalized multichannel imageltering structures, IEEE Trans. Image Process., vol. 6, no. 7, pp. 10381045, Jul. 1997. [5] T. Chen and H. R. Wu, Adaptive impulse detection using center-weighted median lters, IEEE Signal Process. Lett., vol. 8, no. 1, pp. 13, Jan. 2001. [6] L. Yin, R. Yang, and Y. Neuvo, Weighted median lters: A tutorial, IEEE Trans. Circuits Syst. II, Analog Digit. Signal Process., vol. 43, no. 3, pp. 157192, Mar. 1996. [7] D. R. K. Brownrigg, The weighted median lter, Commun. ACM, vol. 27, no. 8, pp. 807818, Aug. 1984. [8] R. Yang, L. Yin, M. Gabbouj, J. Astola, and Y. Neuvo, Optimal weighted median ltering under structural constraints, IEEE Trans. Signal Process., vol. 43, no. 3, pp. 591604, Mar. 1995. [9] P.-T. Yu and W.-H. Lao, Weighted order statistics lterTheir classication, some properties, and conversion algorithm, IEEE Trans. Signal Process., vol. 42, no. 10, pp. 24832497, Oct. 1994. [10] W. T. Freeman and E. H. Andelson, The design and use of steerable lters, IEEE Trans. Pattern Anal. Mach. Intell., vol. 13, no. 9, pp. 891906, Sep. 1991. [11] E. Simoncelli and H. Farid, Steerable wedge lters for local orientation analysis, IEEE Trans. Image Process., vol. 5, no. 9, pp. 13771382, Sep. 1996. [12] A. A. Bharath and J. Ng, A steerable complex wavelet construction and its application to image denoising, IEEE Trans. Image Process., vol. 14, no. 7, pp. 948959, Jul. 2005. [13] D. Charalampidis and T. Kasparis, Waveletbased rotational invariant segmentation and classication of textural images using directional roughness features, IEEE Trans. Image Process., vol. 11, no. 8, pp. 825836, Aug. 2002. [14] E. Simoncelli, W. Freeman, E. Adelson, and D. Heeger, Shiftable multiscale transforms, IEEE Trans. Inf. Theory, vol. 38, no. 2, pp. 587607, Mar. 1992. [15] P. Perona, Deformable kernels for early vision, IEEE Trans. Pattern Anal. Mach. Intell., vol. 17, no. 5, pp. 488499, May 1995. [16] P. C. Teo and Y. Hel-Or, Design of multiparameter steerable functions using cascade basis reduction, IEEE Trans. Pattern Anal. Mach. Intell., vol. 21, no. 6, pp. 552556, Jun. 1999. [17] Y. Dong and S. Xu, A new directional weighted median lter for removal of random-valued impulse noise, IEEE Signal Process. Lett., vol. 14, no. 3, pp. 193196, Mar. 2007. [18] Y. Li, G. R. Arce, and J. Bacca, Weighted median lters for multichannel signals, IEEE Trans. Signal Process., vol. 54, no. 11, pp. 42714281, Nov. 2006. [19] G. R. Arce, A general weighted median lter structure admitting negative weights, IEEE Trans. Signal Process., vol. 46, no. 12, pp. 31953205, Dec. 1998. [20] G. R. Arce and J. L. Paredes, Recursive weighted median lters admitting negative weights and their optimization, IEEE Trans. Signal Process., vol. 48, no. 3, pp. 768779, Mar. 2000. [21] G. R. Arce, Nonlinear Signal Processing: A Statistical Approach. New York: Wiley, Nov. 2004. [22] K.-S. Choi, A. W. Morales, and S.-J. Ko, Design of linear combination of weighted medians, IEEE Trans. Signal Process., vol. 49, no. 9, pp. 19401952, Sep. 2001. [23] I. Shmulevich and G. R. Arce, Spectral design of weighted median lters admitting negative weights, IEEE Signal Process. Lett., vol. 8, no. 12, pp. 313316, Dec. 2001. [24] S. Hoyos, Y. Li, J. Bacca, and G. R. Arce, Weighted median lters admitting complex-valued weights and their optimization, IEEE Trans. Signal Process., vol. 52, no. 10, pp. 27762787, Oct. 2004, Part 1. Dimitrios Charalampidis (S99M01) received the Diploma degree in electrical engineering and computer technology from the University of Patras, Greece, in 1996, and the M.S. and Ph.D. degrees in electrical engineering from the University of Central Florida, Orlando, in 1998 and 2001, respectively. In August 2001, he joined the Electrical Engineering Department, University of New Orleans, New Orleans, LA, where he is currently an Associate Professor. His research interests include image processing, pattern recognition, digital signal processing, neural networks, and applications of signal processing to remote sensing.

REFERENCES
[1] S.-J. Ko and T. M. Forest, Image sequence enhancement based on adaptive symmetric order statistics, IEEE Trans. Circuits Syst. II, Analog Digit. Signal Process., vol. 40, no. 8, pp. 504509, Aug. 1993. [2] A. Burian and P. Kuosmanen, Tuning the smoothness of the recursive median lter, IEEE Trans. Image Process., vol. 5, no. 7, pp. 16311639, Jul. 2002. [3] A. Kundu and J. Zhou, Combination median lter, IEEE Trans. Image Process., vol. 1, no. 3, pp. 422429, Jul. 1992.

Authorized licensed use limited to: St. Xavier's Catholic College of Engineering. Downloaded on May 13,2010 at 10:48:23 UTC from IEEE Xplore. Restrictions apply.

Potrebbero piacerti anche