Você está na página 1de 13

882 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO.

4, APRIL 2010

Steerable Weighted Median Filters


Dimitrios Charalampidis, Member, IEEE

AbstractA filter is steerable if transformed (i.e., rotated, scaled, of a filtering operation using a filter oriented at
etc.) versions of its impulse response can be expressed as linear angle can be computed as the linear combination of a finite
combinations of a fixed set of basis functions. Steerability is im- set of outputs
portant for numerous image processing applications. However, it
is a property presently shared only by a specific class of linear fil- obtained by applying the same filter oriented in directions,
ters. On the other hand, several classes of nonlinear filters, such respectively. Steerability has found applica-
as weighted median filters (WMFs), may offer certain advantages tions in orientation analysis [11], image denoising [12], and
over linear filters such as robustness and edge preserving capabili- texture analysis [13]. The concept of steerability was extended
ties. In this paper, the concept of steerability is extended to encom- to include not only orientation, but also translations and scales
pass WMFs. It will be shown that, in general, a steerable WMF
design technique needs to be capable of handling negative weights. [14], arbitrary compact transformations [15], and transforma-
Although methods that allow the design of WMFs admitting neg- tions within the context of Lie transformations groups [16].
ative weights have already been proposed, such methods do not In general, a linear filter parametrized by a vector is steer-
necessarily produce filters that are steerable, as opposed to the ap- able if its impulse response can be obtained, for an arbitrary
proach presented in this work. Experimental results illustrate the choice of , by a linear combination of impulse responses,
applicability of steerable WMFs in two applications, namely edge
detection and orientation analysis. parametrized by vectors . Although
directional median filters have been used in the literature for
I. INTRODUCTION image processing applications, including denoising [17], the
authors are not aware of a framework that associates directional
median filters and steerability.
RDER statistics filters, including their special case, the
O median filter, and its modifications [1][4], have attracted
a great interest in the past few years, due to their usefulness in
In this paper, the concept of steerability is extended to include
WMFs. Steerable median filters (SMFs) are a special case of
WMFs and inherent the noise-robustness and edge-preserving
several applications of signal processing. In particular, median
capability of WMFs. The advantages of SMFs over their linear
filters possess two important properties, namely edge preserva-
counterparts as well as other WMFs are illustrated in the exper-
tion and noise attenuation. The latter mostly refers to the spe-
imental results section. It should be mentioned at this point that
cial case of impulsive noise [5]. Other order statistics filters, in-
the concept of steerability, as defined above, is not identical to
cluding the minimum and maximum filters, have been success-
the concept of steerability associated to multichannel processing
fully used in morphological image processing as the erosion and
[18]. In the latter case, processing is not performed across dif-
dilation operators, respectively.
ferent orientations or translations, but across different channels,
The disadvantage of traditional order statistics filters, com-
such as in the case of multispectral color or image processing.
pared to linear filters, used to be their inflexibility. For instance,
This paper is organized as follows. Section II introduces the
linear smoothers can be implemented as weighted moving aver-
SMF design method. In Section III, two applications of SMFs,
ages. Therefore, smoothing filters with different spatial and fre-
namely edge detection and orientation analysis, are examined in
quency characteristics can be obtained by choosing appropriate
more detail. Section IV presents experimental results that illus-
weights. In order to provide more flexibility in the design of me-
trate the effectiveness of SMF in edge detection, and orientation
dian filters, the weighted median filter (WMF) was introduced
analysis. Section V concludes with some discussion.
[6][8]. The WMF was proposed as an extension of the tradi-
tional median filter, and was designed by assigning a non-neg- II. STEERABLE WEIGHTED MEDIAN FILTERS
ative weight to each position in the filter window. Based on the
In what follows, we concentrate on the design of SMFs. The
same concept, weighted order statistics filters (WOSFs) were
design of steerable WOSFs is a straightforward extension of
designed [9]. Later, methods for designing WMFs admitting
SMFs. Subsection II-A presents some background and insights
negative and even complex weights were introduced [19][24].
regarding WMFs admitting positive weights. Subsection II-B
Another advantage of 2-D linear filters was identified with
investigates the steerability property, and its applicability to ex-
the introduction of the steerability concept [10]. Considering
isting WMF design methods admitting negative weights. Sub-
an input image , steerability implies that the output
section 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 This paper deals with 2-D filtering. However, the input
associate editor coordinating the review of this manuscript and approving it for samples and weights are represented as 1-D sequences in
publication was Dr. Michael Elad. order to provide simplicity in notation. More specifically, the
The author is with the Electrical Engineering Department, University of New
Orleans, New Orleans, LA 70148 USA (e-mail: dcharala@uno.edu). coefficients or weights of a 2-D discrete, finite length function
Digital Object Identifier 10.1109/TIP.2009.2038823 representing a 2-D image block or a 2-D filter can be rearranged
1057-7149/$26.00 2010 IEEE

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 883

into an 1-D sequence by alligning all matrix columns into a Equation (6) implies that the median is the input sample value
single column. Spatial domain filtering, including median associated to the bin, , at which the CMF is greater than 0.5,
filtering, is performed by sliding a processing window horizon- while the CMF value at the immediately previous bin, , is
tally and vertically, over the whole image, one pixel at a time. In smaller than 0.5. Based on the above discussion, we can draw a
what follows, the WMF design process will be explained using few important conclusions. First, it can be observed that if (5)
a single instance of the filtering operation where the processing and (6) are used for the calculation of the weighted median, then
window is centered at a particular image pixel. the weights do not have to be integer-valued. As a result, WMFs
Given the input samples , the output of a can be allowed to have the same flexibility as their linear filter
weighted median filter characterized by the set of positive counterparts. Second, if the input values are integer valued, as in
weights is given by the case of images, then sorting of the input values is equivalent
to building the empirical PMF, which can be performed in .
(1)
B. Steerability and WMFs Admitting Negative Weights
where is the replication operator defined as
The SMFs proposed in this work are WMFs whose associ-
ated weight masks can be expressed as a linear combination of
(2) weight masks associated to a fixed set of WMFs. First, con-
sider a set of parameters represented by vector , and a set
Alternatively, assuming that the input samples have been of weights corresponding to the sorted inputs
sorted in an ascending order, , the output of the . Assume that the set of weights parametrized by
weighted median filter is given by an arbitrary vector can be expressed as a linear combina-
tion of a set of weights, parametrized by vectors
(3) . In other words

where are the ordered weights corresponding to


(7)
the sorted set of input samples. The total sum of weights is de-
fined as
Equation (7) describes a relation between weights, which is
equivalent to the one satisfied by steerable linear filters. The
(4)
CMF corresponding to vector is given by

The cummulative sum is defined as (8)

(5) Moreover, the total sum of the weights parametrized by vector


is defined as
Essentially, is the frequency with which the th sorted
sample, , occurs within the set of input samples. Therefore, (9)
is equivalent to the value of the th bin of the em-
pirical probability mass function (PMF), and , as defined in As indicated in (5), (8) is derived from (7) by cumulatively sum-
(5), is the corresponding cummulative mass function (CMF). It
ming both sides of (7). For that purpose, the weights on both
should be mentioned at this point that the PMF and CMF may
sides of (7) have to be ordered according to the input samples.
be constructed following two different approaches. Based on the
It should be emphasized at this point that it is imperative that
first approach, each individual input sample may occupy its own
the sorting of input samples is independent of the parametriza-
bin in the PMF. Based on the second approach, input samples
tion, . Otherwise, although the bin associated with the weighted
having the same value, say , may occupy a single bin. In the
latter case, the value of the PMF at the particular bin is calcu- mean for weights may be determined from ,
lated from the sum of the weights associated to all input samples the actual input sample to which this bin corresponds can only
having a value equal to . Both approaches lead to equivalent be determined after the input samples have been re-sorted ac-
SMF designs. Thus, in what follows, it can be assumed that any cording to the particular parametrization . The need for such
of the two approaches has been used, unless it is stated other- re-sorting may nullify the computational advantage of steerable
wise. implementations. Yet, the dependence of input sample sorting
The weighted median value equals the value of the input on the parametrization is linked to another significant problem
sample that corresponds to the bin at which the CMF is equal to that becomes apparent in the following discussion.
0.5. In practice, the CMF may not be exactly equal to 0.5 at any In general, in order to be able to implement WMFs that
bin. The weighted median output is given by resemble arbitrary linear filters, the set of weights has to in-
clude negative valued weights. The design of WMFs admitting
(6) negative weights has already been investigated. In [19], [20],

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
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 filter with negative have to be determined, once for sequence and once
weights is defined to be for sequence . Therefore, the values would have
to be redetermined for every image window processed.
Another approach for designing WMFs as a linear combi-
nations of other WMFs was introduced in [22]. The technique
in [22] is capable of handling negative weights. For instance,
(10)
in the case where a WMF weight mask contains both negative
and positive weights, the WMF could be expressed as a com-
Essentially, the weight signs are transferred to their cor- bination of two or more WMFs. In the case where the WMF
responding input samples. However, the WMF definition is expressed as a linear combination of two WMFs, the first
of (10) is not appropriate in this work because the sorting WMF weight mask would contain the positive weights, while
of input samples depends on the weight values. A simple the negative weights would be substituted by zeros. Similarly,
example confirms this statement. Consider two sequences the second WMF weight mask would contain the absolute value
and , and of the negative weights, while the positive weights would be
two sets of weights and substituted by zeros. In other words, the WMF operation would
. Although vectors and be expressed as , where and are pos-
are used to distinguish between two different parametrizations, itive constants and where
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 (11)
on the parametrization. The weights ordered according to their
associated sorted input samples are presented in Table I(b). In (11), is the unit step function. The technique is not appli-
The correspondence between weights under the two different cable in this work since is a nonlinear function. Therefore,
parametrizations is presented in Table I(c) for both sequences. the linear relationship between weights in (9) does not hold.
It can be observed that the weight correspondence differs
for each sequence. If the two sets of weights C. Proposed WMFs
and had to be linearly combined in order to In this subsection, a new method for handling negative
produce a set of weights under a different parametrization, , as weights is proposed. First, let us consider a linear filter de-
described in (7), then two different sets of values would scribed by a set of noninteger coefficient weights .

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 885

Although it is not common, the output of the filtering output for inal weights are used in the subsequent discussion. The corre-
a given set of input samples can be expressed as follows: sponding CMF of the first median in (15) is

(16)

As a reminder, the tilde implies that the weights and the


(12) sequence are ordered according to the sorted input samples
.
Coming back to the concept of steerability, using (7), the
where are integer-valued weights, and a large posi- CMF for a set of weights parametrized by an arbitrary vector, ,
tive constant so that . The weights and can be expressed as
the constant are used in order to be able to express the fil-
tering operation in (12) using the replication operators (since the (17)
actual weights are noninteger-valued). This representation
does not result in a loss of generality since the weights and
the constant can be made arbitrarily large. The filter output where it is implied that the offset sequence should be inde-
can also be expressed as pendent of the parametrization. Thus, the second weighted me-
dian in (15) is independent of the parametrization. Some manip-
ulations lead to the following equation:

(13)

(18)
where is a positive integer sequence used to guarantee that
all offset weights, , are positive. In other words,
. The noninteger version which can also be expressed as
of is defined as . Moreover, is defined
as

(14) (19)

where
The Sum operators can be converted into Mean operators. For
example, (20)
. A median-based filter associated with the
filter of (13) can be obtained by replacing the Mean by the
Median operator. Then, the WMF output admitting negative The term in (19) can be itself considered to rep-
weights is defined as
resent a CMF, namely, ,
where the superscript has, in this case, been used for con-
sistency in the notation. More specifically, using (16), (19) can
be expressed as
(15)
(21)
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 assump- It can be observed that . Equation (21) implies
tion was based on the fact that, in this particular case, the median that, if (7) holds, the CMF corresponding to a set of weights pa-
and mean of a constant input sequence provide the same output, rametrized by an arbitrary vector can be expressed as a linear
namely the value of an input sequence sample. combination of CMFs. Therefore, the CMFs are steerable
Since the integer weights are simply propor- functions. The median can be determined by (6). Not all values
tional to the original weights , a WMF using ei- need to be examined in order to determine the median. Using a
ther set of weights produces identical results. Thus, the orig- binary search, the median can be determined in .

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
886 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

III. APPLICATIONS tation. The orientation that best identifies an edge is the one
In this section, two applications of SMFs are presented, at which the gradient is maximum. In other words, it is of in-
specifically, edge detection (Section III-A) and orientation terest to determine : the maximum possible weighted me-
analysis (Section III-B). dian with respect to direction . An efficient approach for de-
termining is described next. First, the following discrete
A. Edge Detection function is defined:
Consider a WMF oriented at direction described by the 2-D (29)
weight mask of size . The total number of weights
is, therefore, equal to . The parametrized set of weights For each bin, , function is equal to the minimum value of
is equal to the 1-D column-wise reshaped version with respect to all orientations . Function has the following
of . The superscript, , is equivalent to the parameter properties.
vector that appears in the equations of Section II. However, for 1) Property 1: Function is a nondecreasing function of .
the application presented here, a single parameter is sufficient Moreover, and .
for steering the WMF. For the purpose of edge detection, the Property 2: If , then the value of the input sample
function can be defined as follows: that corresponds to bin cannot be the weighted median of
the input sequence, for any value of .
(22) Property 3: If , then corresponds to a bin
, for which .
where The proof of the three properties is presented in the Appendix.
Property 1 implies that has the same properties as a PMF
(23) and, therefore, can be viewed as such as function. The three
properties can be used to prove the following property:
is an isotropic Gaussian envelope with standard deviation . Property 4: is equal to the input sample value corre-
The function as defined in (22) is commonly used as a sponding to the th bin, for which the following two conditions
linear filter in edge detection applications. Function is are satisfied and . There is only one bin
steerable, since it can be expressed as satisfying both conditions.
The proof of property 4 is also presented in the Appendix. Es-
(24)
sentially, property 4 implies that the maximum weighted median
Therefore, the ordered weights associated to the sorted input considering all possible orientations, , is the median value of a
samples can be expressed as set of samples whose associated PMF is equal to . It should
also be mentioned that although the four properties are pre-
sented for the case where the median filter weights are param-
(25)
etrized by the orientation variable , they are valid for any ar-
The positive 1-D sequence, , introduced in (13) can be bitrary parametrization, such as the one presented in Section II.
obtained by rearranging the elements of the following 2-D In order to determine the maximum weighted median, a binary
isotropic function of size search over bins, , can be performed on to check the validity
of conditions and .
(26) In the particular case where is defined as in (27) and (28),
the discrete function is defined as
It can be easily shown that . Therefore,
. In this case, (21) can be expressed as
(30)

(27)
A modification can be incorporated in (15), specifically for
where . By observing (20), and by using the case of edge detection. The modification is explained with
the fact that the total sum of weights is zero regardless of the help of Fig. 1. In this example, an edge separates two regions
the angle labeled 1 and 2, respectively. There are two sets of weights
associated to the proposed filter 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
(28)
additional shift outputs a median value equal to the pixel values
Considering that the function of (22) is a gradient detector, the of region 2. The -window outputs a median value
output of the SMF provides the gradient at a particular orien- equal to the pixel values of region 2, earlier than the -window.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 887

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

Equation (15) defines the overall output as the difference of


the two weighted medians. However, it can be observed that in
order to obtain a single-pixel wide edge, the -window
output needs to be equal to the value of region 2 earlier than
the -window for just a single shift, up to no more than two
shifts. This can be achieved by replacing the first 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 filters, including wedge filters [11], have been used
in orientation analysis. The filter used in this section is described
by the following function:

(31) Fig. 2. Edge detection example: (a) original image, (b) using simple differ-
0 0
ence masks [ 1; 1]; [ 1; 1] , (c) using the function in (22) as a linear filter,
0 0
(d) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (e) using the
where the filters in (31) are angular harmonic filters median filter in [21], (f) using the proposed filter.

, the CMF , can be expressed as in (21) for


, and for
(32)
and where (35)
(33)
and

The weights corresponding to the 2-D


function are obtained by rearranging the elements of (36)
into an 1-D array. Each -dependent weight sequence
can be made non-negative by adding a positive constant se- IV. EXPERIMENTAL RESULTS
quence, . The weight sequence ordered according to
In this section, experimental results showcase the advantage
the sorted input sequence, associated to direction , is given by
of steerable WMFs over their linear counterparts for two appli-
cations: 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
(34) image intensities range between 0 and 1. The size of the WMF
weight mask is set equal to , where is the
where the constant sequence standard deviation of the Gaussian envelope presented
has been included to ensure that the weights have no excess in (22). As a reminder, function is used to describe the
positive value (in other words, ). Observing (20) weight mask of a WMF filter oriented at direction . Moreover,
and using the fact that in this particular case as discussed in Section III-A, only the WMFs oriented at

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
888 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

Fig. 4. Comparison between proposed filter and WMF followed by masks


0 0
[ 1; 1]; [ 1; 1] . The images to the left are the original corrupted by noise.
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 0 0
linear filter, (d) using WMF followed by masks [ 1; 1],[ 1; 1] , (e) using the 0 0
median filter in [21], (f) using the proposed filter.

are needed for the extraction of edges. In order to perform


comparisons between SMFs and their linear counterparts, the
exact same function, , oriented at 0 and is used as a
linear filter. More specifically, if and are
the images produced by filtering the original image with
linear filters and , respectively, the image
containing the edge magnitudes is commonly defined as

(37)
The subscript, , is simply used to indicate that the images are
a result of processing using linear filters.
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 Fig. 5. Vertical edge profiles corresponding to the examples of Fig. 4.
detected using two simple masks, a horizontal and a
vertical . Fig. 2(c) presents the edges obtained using
linear filters and . It can be observed that in (10). As indicated in [21], since gradient masks consist of
closely located edges are not resolved for the particular stan- the same number of negative and positive weights, the filter
dard deviation, . Fig. 2(d) presents the edges obtained output within a particular image window is simply equal to
using a WMF having a Gaussian weight mask as , where is the smallest pixel
defined in (23), followed by application of masks and value associated to a positive weight and is the smallest
. Fig. 2(e) illustrates the results obtained by the me- value associated to a negative weight. Through a modification
dian-based technique presented in [21]. This technique is based discussed in [21], the filter output can be defined as the min-
on the WMF approach admitting negative weights defined imum between and , where

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 889

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

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

is the largest value associated to a positive weight, and


is the largest value associated to a negative weight. The
3 3 operator and its transpose
were used as masks. Nevertheless, only the signs and not the
actual mask values are of relevance in this case, which is a dis-
advantage of the technique. Finally, Fig. 2(f) presents the edges
detected using the proposed implementation. All techniques,
except the linear filter approach using and ,
are capable of resolving closely-located edges. For the linear
filter 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 Fig. 8. Edge detection example (Baboon): (a) original image, (b) using WMF
corrupted by impulsive noise of probability 0.2 and uniformly
0 0
followed by difference masks [ 1; 1],[ 1; 1] , (c) using the median filter in
[21], (d) using the proposed filter.
distributed magnitude in the range 01. In other words, approx-
imately 20% of the pixels in the original image have been re-
placed by a random value in the range 01. As expected, the large spatial support depending on the level of noise present in
high level of noise present renders the simple masks the image. Nevertheless, linear edge detectors with large spa-
and ineffective, as illustrated in Fig. 3(b). Linear fil- tial support tend to blur image characteristics, including edges.
ters perform moderately well in rejecting noise, as shown in The median-based filter in [21] also appears to be sensitive to
Fig. 3(c). However, they are still unable to detect closely located noise, as indicated in Fig. 3(e). This is partially due to the small
edges. This example demonstrates that, in order to effectively mask size; however, a larger mask may cause other problems as
detect edges under noise conditions, filters require a relatively illustrated in a later example. On the other hand, the proposed

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
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 0 0 Fig. 10. Orientation analysis example: (a) Original image, (b) filter used in ori-
(22) as linear filter, (d) using WMF followed by masks [ 1; 1]; [ 1; 1] , (e) 0 0 entation analysis. Orientation analysis using: (c) linear steerable filter, (d) SMF.
using the median filter in [21], (f) using the proposed filter. Orientation transition analysis using: (e) linear steerable filter, (f) SMF.

filter and the WMF followed by masks and are edges of at least the same magnitude and possesses the same
capable of identifying edges, while effectively rejecting impul- capability in resolving closely located edges as the WMF fol-
sive noise. Some local edge shifting occurs due to noise for all lowed by masks and . The noise present in the
filters. edge images produced by the competing WMF method may not
Since the previous examples identified that the proposed filter appear to be significant compared to the edge strengths, for the
and the WMF followed by masks and exhibit case of uniform noise. However, in this example, the intensity
the best performance among the methods compared, their per- transitions defining the edges are the greatest possible. Noise re-
formance is further evaluated in Figs. 4 and 5. Fig. 4 presents sults in more significant problems in cases where weaker edges
edge detection results for four different vertical bar examples, are present in the image, as shown in Fig. 7 discussed next.
namely for two different bar widths and two different types of Next, some edge detection examples are presented for real
noise (uniform additive of standard deviation 0.116, and impul- images. Fig. 6 illustrates that all edge detection methods may be
sive of probability 30%). Fig. 5 shows the four corresponding successful under noise-free conditions. However, it is well-es-
vertical edge profiles obtained by summing the edge image pixel tablished that linear filtering is not effective in removing im-
values columnwise. The profiles are zoomed around the edge pulsive noise. Fig. 7 compares the three median-based methods
locations. In Fig. 5, however, the vertical edge profiles are pre- for the case where the image is corrupted by uniform noise. A
sented for three different levels of noise. In the case of uniform 7 7 extended Sobel operator is used for the method in [21],
additive noise, the standard deviations are 0 (thin black line), in order to be able to better handle the presence of noise. Nev-
0.058 (gray line), and and 0.116 (thick black line). In the case ertheless, the intensity at the edges as well as the background
of impulsive noise, the probabilities are 0 (thin black line), 15% has a blocky appearance. This is due to the fact that, as was
(gray line), and 30% (thick black line). The purpose of these described earlier, only the weight signs and not the particular
examples is to illustrate that the proposed filter is more effec- filter weights are of importance for this method. The proposed
tive in removing noise (as shown in Fig. 4), while it results in filter appears to be the most successful in rejecting noise. Fig. 8

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 891

Fig. 12. Angular transition profiles: (a) steerable linear filter, (b) SMF.

Fig. 13. Angular transition profiles: (a) steerable linear filter, (b) SMF.

characteristics around a specific image location. In order


to obtain angular transition profiles, the difference profile,
is
used. In what follows, it is assumed that image intensities vary
in the range [0,1], and . Moreover, in some cases,
images are depicted using a contrast different than the actual
one, so that the superimposed angular transition profiles can be
clearly visualized.
Fig. 10 shows an orientation analysis example. Fig. 10(a) de-
Fig. 11. Orientation analysis example: (a) Original image, (b) filter used in ori- picts the original image, and Fig. 10(b) shows the filter used
entation analysis. Orientation analysis using: (c) linear steerable filter, (d) SMF.
Orientation transition analysis using: (e) linear steerable filter, (f) SMF.
in the experiments for a specific orientation, i.e., .
Figs. 10(c) and (d) present the angular profiles, , for
compares the three median-based methods for an image where the steerable linear filter and the proposed SMF, respectively.
there is naturally noise-like texture present. It can be observed Similarly, Figs. 10(e) and (f) present the angular transition pro-
that the proposed filter is the only one capable of ignoring the files, , for the linear filter and the SMF, respectively.
texture associated to fur such as in locations around the eyes, In this example, a total of filters are used. It can
while finding all significant edges. be observed that the SMF produces an angular profile whose
Fig. 9 illustrates an advantage of steerable versus orientation values are closer to the actual image intensities over the an-
variant approaches. The particular image is selected since it con- gular range, compared to the linear counterpart. In particular,
tains edges at different orientations. Only the steerable linear the original image shown in Fig. 10 has intensities approxi-
filter using the function of (22) and the proposed method are able mately equal to 0.81, 1, 0.81, 0.62, and 1, for the angular ranges
to correctly determine that all edges are of the same strength, re- and , re-
gardless of their orientation. spectively. Furthermore, the angular profile, , for SMF
is capable of identifying sharp angular transitions. Accordingly,
B. Orientation Analysis these observations are reflected in the angular transition profile,
In this section, experimental results showcase the perfor- , which is more accurate for the case of SMF. The
mance of the proposed SMFs in orientation analysis. In all steerable linear filter is unable to separate the two angular tran-
experiments, the function of (31) is used as both the sitions at and . Fig. 10 confirms that median filters
impulse response of linear filters and the weight mask of SMFs. are superior to linear filters in retaining edges and fast transi-
Specifically, the filters used in this subsection are defined as tions in images. In this work, this advantage is injected to the
for , where , and concept of steerability.
zero otherwise. Orientation analysis is performed by applying a The angular resolution of linear filters improves as in-
filter (linear or SMF) in orientations to obtain an angular pro- creases. Fig. 11 presents the example of Fig. 10, but for
file, . In the definition of . For this value of , the steerable linear filter can sepa-
it is assumed that if , then . rate the two angular transitions at and . Yet, the an-
Function is appropriate for capturing the intensity gular profile produced by the SMF is more accurate even for

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
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 profiles for sive noise, while the linear filters appear to be more suitable
, and demonstrates that the distance of the for images corrupted by additive noise. Nevertheless, even in
curve from the center indicates the strength of the angular tran- the case of additive noise, the SMFs are still capable of iden-
sition. Although the linear filter is able to detect the significant tifying the significant transitions in the orientation transition
transitions, the transition strengths do not reflect the true tran- profiles, without producing false transition peaks. The latter
sition values, which are equal to 0.19, 0.19, 0.19, 0.19, 0.38, at is not true for linear filters when images are corrupted by im-
angles , respectively. As shown in Fig. 13, pulsive noise.
even when , the angular profile for the linear steer- Fig. 16 presents orientation transition profiles at several, ran-
able filters, although improved, is not as accurate as that of the domly selected points around the edges of the Butterfly image.
SMF. It should be mentioned at this point that when orienta- The image has been corrupted by impulsive noise of probability
tion transition profiles are superimposed on images, such as in 40%. Finally, Fig. 17 presents orientation transition profiles at
Figs. 10(e), (f), 11(e), (f), and 1417, the profiles are scaled ap- several, randomly selected points around the edges of the Pep-
propriately for visualization purposes. pers image. The particular image indicates that the majority of
In order to examine the performance of SMFs under noisy the SMF and linear filter profiles are relatively similar. How-
conditions, several angular transition profiles are presented for ever, the profiles produced by the linear filters had to be scaled
the image of Fig. 10(a) when it is corrupted by impulsive noise twice as much compared to the profiles produced by the SMFs
of 30% probability (in Fig. 14), and uniform noise of standard since, as mentioned earlier, linear filters do not produce as ac-
deviation 0.058 (in Fig. 15). The SMFs are resistant to impul- curate angular profiles as SMFs.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS 893

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

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

V. DISCUSSION AND CONCLUSION of orientation analysis presented in Section III-B, the computa-
tional efficiency advantage of SMFs over nonsteerable WMFs
In this paper, a steerable weighted median filter (SMF) imple- may not be so obvious. In order to shed some light into this
mentation is proposed as an extension to weighted median fil- issue, assume that it is of interest to obtain the weighted median
ters (WMFs). The proposed work aims to join the advantages of for numerous directions. The computational cost necessary for
median filters and steerable filters. It is well known that median ordering the input samples may be disregarded as it is only per-
filters are good at handling noise, and especially noise of the im- formed once. Consider a single direction out of all directions
pulsive type, and at preserving distinctive image characteristics, of interest for which the weighted median will be computed. If
such as edges. On the other hand, steerable filters provide com- the number of filter weights is equal to , a nonsteerable im-
putational efficiency. In order to achieve the integration of the plementation requires, in average, a total of addition oper-
median and steerable concepts, a new WMF approach for han- ations in order to obtain the CMF from the PMF until the bin
dling negative weights is introduced. The goal of the proposed corresponding to the median is reached. Here, it was assumed
work is not to introduce a particular filter mask with character- that each input sample occupies its own bin in the PMF. If all
istics which are optimal in some sense. Therefore, other filters equally-valued input samples occupy the same bin, assuming
instead of the ones used in the Sections III and IV could be used 256 intensity levels in the input image, there are 128 additions
to exemplify the performance of SMFs. Nevertheless, the op- needed in average to obtain the CMF from the PMF. How-
timization of SMF weights for more general applications is an ever, an additional addition operations are needed to popu-
important aspect of filter design, and will be addressed in fu- late the PMF. If each sample occupies its own bin, sorting of the
ture work. Approaches such as the one presented in [23] will be input samples is more computationally expensive. Yet, as men-
investigated. tioned earlier, the time required for sorting may be ignored if the
It may be advantageous at this point to discuss the compu- number of directions is large. The proposed SMF implementa-
tational advantage of SMFs over nonsteerable WMFs. In some tion requires multiplications and additions to linearly
cases, such an advantage is apparent. For instance, in the case of combine the CMFs for each bin. Since the median is determined
edge detection application presented in Section III-A, only two directly from the CMFs, only bins need to be searched.
WMFs are required for determining the median-based gradient Therefore, a total of operations is needed for
magnitude. A nonsteerable implementation would require sev- the proposed SMF. In order to evaluate the difference, assume
eral gradient-based WMF operations applied at several orienta- that for a filter of size .
tions, in order to determine the maximum gradient. In the case Then, a total of 512 operations is needed, in average, to com-

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.
894 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 4, APRIL 2010

pute the output of a nonsteerable WMF, while a total of only [4] D. G. Karakos and P. E. Trahanias, Generalized multichannel image-
210 operations is required by the proposed technique. The sav- filtering structures, IEEE Trans. Image Process., vol. 6, no. 7, pp.
10381045, Jul. 1997.
ings increase as the filter size increases, which is when com- [5] T. Chen and H. R. Wu, Adaptive impulse detection using
putational efficiency is mostly necessary, and as the number of center-weighted median filters, IEEE Signal Process. Lett., vol.
filters decreases. 8, no. 1, pp. 13, Jan. 2001.
[6] L. Yin, R. Yang, and Y. Neuvo, Weighted median filters: A tutorial,
IEEE Trans. Circuits Syst. II, Analog Digit. Signal Process., vol. 43,
APPENDIX no. 3, pp. 157192, Mar. 1996.
[7] D. R. K. Brownrigg, The weighted median filter, Commun. ACM, vol.
Next, the proofs of the four properties of function pre- 27, no. 8, pp. 807818, Aug. 1984.
[8] R. Yang, L. Yin, M. Gabbouj, J. Astola, and Y. Neuvo, Optimal
sented in Section III-A are demonstrated. weighted median filtering under structural constraints, IEEE Trans.
Proof of Property 1: Property 1 states that is nonde- Signal Process., vol. 43, no. 3, pp. 591604, Mar. 1995.
creasing with . The proof of this property is straightforward. [9] P.-T. Yu and W.-H. Lao, Weighted order statistics filterTheir clas-
sification, some properties, and conversion algorithm, IEEE Trans.
Assume that , which would invalidate the prop- Signal Process., vol. 42, no. 10, pp. 24832497, Oct. 1994.
erty. Considering that the orientation at which the minimum [10] W. T. Freeman and E. H. Andelson, The design and use of steer-
occurs is , the assumption would imply that able filters, IEEE Trans. Pattern Anal. Mach. Intell., vol. 13, no. 9,
pp. 891906, Sep. 1991.
. Since is a PMF the original assumption [11] E. Simoncelli and H. Farid, Steerable wedge filters for local ori-
is invalid, thus . entation analysis, IEEE Trans. Image Process., vol. 5, no. 9, pp.
Proof of Property 2: If , from property 1 it can be 13771382, Sep. 1996.
[12] A. A. Bharath and J. Ng, A steerable complex wavelet construction
concluded that . Therefore, it is not possible that and its application to image denoising, IEEE Trans. Image Process.,
or can be less than 0.5. In order for an input sample value vol. 14, no. 7, pp. 948959, Jul. 2005.
corresponding to the th bin to be the weighted median for [13] D. Charalampidis and T. Kasparis, Waveletbased rotational in-
variant segmentation and classification of textural images using
a particular orientation , the following two conditions should directional roughness features, IEEE Trans. Image Process., vol. 11,
be both valid: and . Thus, if , no. 8, pp. 825836, Aug. 2002.
then the value of the input sequence corresponding to bin [14] E. Simoncelli, W. Freeman, E. Adelson, and D. Heeger, Shiftable
multiscale transforms, IEEE Trans. Inf. Theory, vol. 38, no. 2, pp.
cannot be the the weighted median of the input sequence, for 587607, Mar. 1992.
any value of . [15] P. Perona, Deformable kernels for early vision, IEEE Trans. Pattern
Proof of Property 3: If , then Anal. Mach. Intell., vol. 17, no. 5, pp. 488499, May 1995.
[16] P. C. Teo and Y. Hel-Or, Design of multiparameter steerable func-
for at least orientation for which is minimum. Since tions using cascade basis reduction, IEEE Trans. Pattern Anal. Mach.
is nondecreasing with , a bin exists for which Intell., vol. 21, no. 6, pp. 552556, Jun. 1999.
[17] Y. Dong and S. Xu, A new directional weighted median filter for re-
and . In other words, there exists a moval of random-valued impulse noise, IEEE Signal Process. Lett.,
bin, , corresponding to the weighted median, for at vol. 14, no. 3, pp. 193196, Mar. 2007.
least one orientation. Thus, if , then the maximum [18] Y. Li, G. R. Arce, and J. Bacca, Weighted median filters for mul-
tichannel signals, IEEE Trans. Signal Process., vol. 54, no. 11, pp.
weighted median considering all possible orientations, , must 42714281, Nov. 2006.
correspond to a bin, , for which . [19] G. R. Arce, A general weighted median filter structure admitting
Proof of Property 4: Property 2 states that if , then negative weights, IEEE Trans. Signal Process., vol. 46, no. 12, pp.
31953205, Dec. 1998.
the value of the input sequence corresponding to bin cannot [20] G. R. Arce and J. L. Paredes, Recursive weighted median filters ad-
be the weighted median of the input sequence, for any value of mitting negative weights and their optimization, IEEE Trans. Signal
. From properties 1 and 2, one can conclude that if , Process., vol. 48, no. 3, pp. 768779, Mar. 2000.
[21] G. R. Arce, Nonlinear Signal Processing: A Statistical Approach.
no bin greater than can correspond to the weighted median New York: Wiley, Nov. 2004.
value for any orientation, . From property 3, if , [22] K.-S. Choi, A. W. Morales, and S.-J. Ko, Design of linear combination
then the maximum value of the weighted median with respect of weighted medians, IEEE Trans. Signal Process., vol. 49, no. 9, pp.
19401952, Sep. 2001.
to all orientations corresponds to a bin greater or equal to . [23] I. Shmulevich and G. R. Arce, Spectral design of weighted median
Therefore, if and the maximum value of filters admitting negative weights, IEEE Signal Process. Lett., vol. 8,
the weighted median with respect to all orientations, , is equal no. 12, pp. 313316, Dec. 2001.
[24] S. Hoyos, Y. Li, J. Bacca, and G. R. Arce, Weighted median filters ad-
to the input sample value corresponding to the th bin. Since, mitting complex-valued weights and their optimization, IEEE Trans.
is nondecreasing with , there is only one bin satisfying both Signal Process., vol. 52, no. 10, pp. 27762787, Oct. 2004, Part 1.
conditions.
Dimitrios Charalampidis (S99M01) received
the Diploma degree in electrical engineering and
computer technology from the University of Patras,
REFERENCES Greece, in 1996, and the M.S. and Ph.D. degrees in
electrical engineering from the University of Central
[1] S.-J. Ko and T. M. Forest, Image sequence enhancement based on Florida, Orlando, in 1998 and 2001, respectively.
adaptive symmetric order statistics, IEEE Trans. Circuits Syst. II, In August 2001, he joined the Electrical Engi-
Analog Digit. Signal Process., vol. 40, no. 8, pp. 504509, Aug. 1993. neering Department, University of New Orleans,
[2] A. Burian and P. Kuosmanen, Tuning the smoothness of the recur- New Orleans, LA, where he is currently an As-
sive median filter, IEEE Trans. Image Process., vol. 5, no. 7, pp. sociate Professor. His research interests include
16311639, Jul. 2002. image processing, pattern recognition, digital signal
[3] A. Kundu and J. Zhou, Combination median filter, IEEE Trans. processing, neural networks, and applications of signal processing to remote
Image Process., vol. 1, no. 3, pp. 422429, Jul. 1992. sensing.

Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

Você também pode gostar