You are on page 1of 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,


etc.) versions of its impulse response can be expressed as linear
combinations of a fixed set of basis functions. Steerability is important for numerous image processing applications. However, it
is a property presently shared only by a specific class of linear filters. On the other hand, several classes of nonlinear filters, such
as weighted median filters (WMFs), may offer certain advantages
over linear filters 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 filters 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 filters, including their special case, the
median filter, and its modifications [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
filters 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 filters, including the minimum and maximum filters, have been successfully used in morphological image processing as the erosion and
dilation operators, respectively.
The disadvantage of traditional order statistics filters, compared to linear filters, used to be their inflexibility. For instance,
linear smoothers can be implemented as weighted moving averages. Therefore, smoothing filters with different spatial and frequency characteristics can be obtained by choosing appropriate
weights. In order to provide more flexibility in the design of median filters, the weighted median filter (WMF) was introduced
[6][8]. The WMF was proposed as an extension of the traditional median filter, and was designed by assigning a non-negative weight to each position in the filter window. Based on the
same concept, weighted order statistics filters (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 filters was identified with
the introduction of the steerability concept [10]. Considering
, steerability implies that the output
an input image

of a filtering operation using a filter oriented at


angle can be computed as the linear combination of a finite
outputs
set of
obtained by applying the same filter 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 filter 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 filters 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 filters and steerability.
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
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 defined 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 Identifier 10.1109/TIP.2009.2038823

This paper deals with 2-D filtering. However, the input


samples and weights are represented as 1-D sequences in
order to provide simplicity in notation. More specifically, the
coefficients or weights of a 2-D discrete, finite length function
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


single column. Spatial domain filtering, including median
filtering, 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 filtering operation where the processing
window is centered at a particular image pixel.
, the output of a
Given the input samples
weighted median filter characterized by the set of positive
weights
is given by

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 flexibility as their linear filter
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

(1)
B. Steerability and WMFs Admitting Negative Weights
where

is the replication operator defined as


(2)

Alternatively, assuming that the input samples have been


sorted in an ascending order,
, the output of the
weighted median filter is given by
(3)
are the ordered weights corresponding to
where
the sorted set of input samples. The total sum of weights is defined as
(4)
The cummulative sum is defined as

(7)
Equation (7) describes a relation between weights, which is
equivalent to the one satisfied by steerable linear filters. The
CMF corresponding to vector is given by
(8)

(5)

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 defined 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
first 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 licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

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 fixed 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

Moreover, the total sum of the weights parametrized by vector


is defined 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 significant problem
that becomes apparent in the following discussion.
In general, in order to be able to implement WMFs that
resemble arbitrary linear filters, the set of weights has to include negative valued weights. The design of WMFs admitting
negative weights has already been investigated. In [19], [20],

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


weights is defined to be

(10)
Essentially, the weight signs are transferred to their corresponding input samples. However, the WMF definition
of (10) is not appropriate in this work because the sorting
of input samples depends on the weight values. A simple
example confirms 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
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

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 first
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)
is the unit step function. The technique is not appliIn (11),
cable 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 filter described by a set of noninteger coefficient weights
.

CHARALAMPIDIS: STEERABLE WEIGHTED MEDIAN FILTERS

885

Although it is not common, the output of the filtering 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 first median in (15) is

(16)

(12)

where
are integer-valued weights, and
a large positive constant so that
. The weights
and
the constant
are used in order to be able to express the filtering 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 filter 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)

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

(18)
which can also be expressed as

(19)

(14)
where
The Sum operators can be converted into Mean operators. For
example,
. 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
weights is defined as

(20)

The term
in (19) can be itself considered to represent a CMF, namely,
,
where the superscript
has, in this case, been used for consistency 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 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.
Since the integer weights
are simply propor, a WMF using eitional to the original weights
ther set of weights produces identical results. Thus, the origAuthorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

. Equation (21) implies


It can be observed that
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

886

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

III. APPLICATIONS
In this section, two applications of SMFs are presented,
specifically, 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 sufficient
for steering the WMF. For the purpose of edge detection, the
can be defined as follows:
function
(22)
where
(23)
is an isotropic Gaussian envelope with standard deviation .
The function
as defined in (22) is commonly used as a
is
linear filter 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

(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

tation. The orientation that best identifies 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 efficient approach for deis described next. First, the following discrete
termining
function is defined:
(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 satisfied
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 filter 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 defined as in (27) and (28),
In the particular case where
is defined as
the discrete function
(30)

(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-

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

A modification can be incorporated in (15), specifically for


the case of edge detection. The modification 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 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
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.

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
-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 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)
where the filters

in (31) are angular harmonic filters

(32)

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 filter,
(d) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (e) using the
median filter in [21], (f) using the proposed filter.

, the CMF
, and for

, can be expressed as in (21) for

and where

(35)
(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

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

(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 licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

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
weight mask is set equal to
, where is the
standard deviation of the Gaussian envelope
presented
in (22). As a reminder, function
is used to describe the
weight mask of a WMF filter oriented at direction . Moreover,
as discussed in Section III-A, only the WMFs oriented at

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 filter, (d) using WMF followed by masks [ 1; 1],[ 1; 1] , (e) using the
median filter in [21], (f) using the proposed filter.

Fig. 4. Comparison between proposed filter 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 filter. More specifically, if
and
are
with
the images produced by filtering the original image
and
, respectively, the image
linear filters
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
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 filters
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
defined in (23), followed by application of masks
and
. 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 defined
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

Fig. 5. Vertical edge profiles 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 filter
output within a particular image window is simply equal to
, where
is the smallest pixel
value associated to a positive weight and
is the smallest
value associated to a negative weight. Through a modification
discussed in [21], the filter output can be defined as the minand
, where
imum between

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 filter in [21], (d) using the proposed filter.

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
filter, (d) using WMF followed by difference masks [ 1; 1],[ 1; 1] , (e) using
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
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 filter approach using
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
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 filters 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, filters require a relatively
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

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

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 filter 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

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 filter, (d) using WMF followed by masks [ 1; 1]; [ 1; 1] , (e)
using the median filter in [21], (f) using the proposed filter.

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

filter 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
filters.
Since the previous examples identified that the proposed filter
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 profiles obtained by summing the edge image pixel
values columnwise. The profiles are zoomed around the edge
locations. In Fig. 5, however, the vertical edge profiles 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 filter 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 significant compared to the edge strengths, for the
case of uniform noise. However, in this example, the intensity
transitions defining the edges are the greatest possible. Noise results in more significant 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 filtering 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
filter weights are of importance for this method. The proposed
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.

Fig. 11. Orientation analysis example: (a) Original image, (b) filter used in orientation analysis. Orientation analysis using: (c) linear steerable filter, (d) SMF.
Orientation transition analysis using: (e) linear steerable filter, (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 filter is the only one capable of ignoring the
texture associated to fur such as in locations around the eyes,
while finding all significant 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
filter 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 filters and the weight mask of SMFs.
Specifically, the filters used in this subsection are defined as
for
, where
, and
zero otherwise. Orientation analysis is performed by applying a
filter (linear or SMF) in orientations to obtain an angular pro. In the definition of
file,
it is assumed that if
, then
.
Function
is appropriate for capturing the intensity
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

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
. 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 profiles can be
clearly visualized.
Fig. 10 shows an orientation analysis example. Fig. 10(a) depicts the original image, and Fig. 10(b) shows the filter used
.
in the experiments for a specific orientation, i.e.,
Figs. 10(c) and (d) present the angular profiles,
, for
the steerable linear filter and the proposed SMF, respectively.
Similarly, Figs. 10(e) and (f) present the angular transition pro, for the linear filter and the SMF, respectively.
files,
In this example, a total of
filters are used. It can
be observed that the SMF produces an angular profile 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
, respectively. Furthermore, the angular profile,
, for SMF
is capable of identifying sharp angular transitions. Accordingly,
these observations are reflected in the angular transition profile,
, which is more accurate for the case of SMF. The
steerable linear filter is unable to separate the two angular transitions at
and
. Fig. 10 confirms that median filters
are superior to linear filters 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 filters improves as
creases. Fig. 11 presents the example of Fig. 10, but for
. For this value of , the steerable linear filter can sepaand
. Yet, the anrate the two angular transitions at
gular profile produced by the SMF is more accurate even for

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


, and demonstrates that the distance of the
curve from the center indicates the strength of the angular transition. Although the linear filter is able to detect the significant
transitions, the transition strengths do not reflect 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 profile for the linear steereven when
able filters, although improved, is not as accurate as that of the
SMF. It should be mentioned at this point that when orientation transition profiles are superimposed on images, such as in
Figs. 10(e), (f), 11(e), (f), and 1417, the profiles are scaled appropriately for visualization purposes.
In order to examine the performance of SMFs under noisy
conditions, several angular transition profiles 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 impulAuthorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

sive noise, while the linear filters 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 significant transitions in the orientation transition
profiles, without producing false transition peaks. The latter
is not true for linear filters when images are corrupted by impulsive noise.
Fig. 16 presents orientation transition profiles at several, randomly selected points around the edges of the Butterfly image.
The image has been corrupted by impulsive noise of probability
40%. Finally, Fig. 17 presents orientation transition profiles at
several, randomly selected points around the edges of the Peppers image. The particular image indicates that the majority of
the SMF and linear filter profiles are relatively similar. However, the profiles produced by the linear filters had to be scaled
twice as much compared to the profiles produced by the SMFs
since, as mentioned earlier, linear filters do not produce as accurate angular profiles as SMFs.

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


In this paper, a steerable weighted median filter (SMF) implementation is proposed as an extension to weighted median filters (WMFs). The proposed work aims to join the advantages of
median filters and steerable filters. It is well known that median
filters 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 filters provide computational efficiency. 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 filter mask with characteristics which are optimal in some sense. Therefore, other filters
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 filter 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
Authorized licensd use limted to: IE Xplore. Downlade on May 13,20 at 1:493 UTC from IE Xplore. Restricon aply.

of orientation analysis presented in Section III-B, the computational efficiency 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 filter 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
directly from the CMFs, only
bins need to be searched.
Therefore, a total of
operations is needed for
the proposed SMF. In order to evaluate the difference, assume
for a filter of size
.
that
Then, a total of 512 operations is needed, in average, to com-

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 filter size increases, which is when computational efficiency is mostly necessary, and as the number of
decreases.
filters
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
the value of the input sequence corresponding to bin
cannot
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 .
Therefore, if
and
the maximum value of
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.

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 filter, IEEE Trans. Image Process., vol. 5, no. 7, pp.
16311639, Jul. 2002.
[3] A. Kundu and J. Zhou, Combination median filter, IEEE Trans.
Image Process., vol. 1, no. 3, pp. 422429, Jul. 1992.

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

[4] D. G. Karakos and P. E. Trahanias, Generalized multichannel imagefiltering 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 filters, IEEE Signal Process. Lett., vol.
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,
no. 3, pp. 157192, Mar. 1996.
[7] D. R. K. Brownrigg, The weighted median filter, 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 filtering 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 filterTheir classification, 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 filters, IEEE Trans. Pattern Anal. Mach. Intell., vol. 13, no. 9,
pp. 891906, Sep. 1991.
[11] E. Simoncelli and H. Farid, Steerable wedge filters 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 classification 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 filter 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 filters for multichannel signals, IEEE Trans. Signal Process., vol. 54, no. 11, pp.
42714281, Nov. 2006.
[19] G. R. Arce, A general weighted median filter 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 filters 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
filters 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 filters 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.

You might also like