THRESHOLD DECOMPOSITION DRIVEN ADAPTIVE
MORPHOLOGICAL FILTER FOR IMAGE SHARPENING
Tarek A. Mahmoud and Stephen Marshall
Department of Electronic and Electrical Engineering,
University of Strathclyde, 204 George Street, Glasgow, UK, G1 1XW
Keywords: Edge detection, image sharpening, morphological filter, threshold decomposition.
Abstract: A new method is proposed to sharpen digital images. This sharpening method is based on edge detection
and a class of morphological filtering. Motivated by the success of threshold decomposition, gradient-based
operators, such as Prewitt operators, are used to detect the locations of the edges. A morphological filter is
used to sharpen these detected edges. Experimental results demonstrate that the performance of these
detected edge deblurring filters is superior to that of the traditional sharpening filter family.
1 INTRODUCTION
The Chinese proverb “One picture is worth a
thousand words” underestimates the amount of
information contained in a single picture. Most
media (e.g. newspapers, TV, cinema) use pictures
(still or moving) as information carriers. The
tremendous volume of optical information and the
need for its processing and transmission paved the
way to image processing by digital computers (Pitas,
1993).
The past twenty years in particular were
characterized by a massive increase in the speed,
power and availability of digital computers.
Accordingly, one area of information technology
that has grown rapidly is imaging science. This
subject has become increasingly important because
of the growing demand to obtain information about
the structure, composition and behaviour of objects
without the need to inspect them visually
(Blackledge, 1989).
Image sharpening has played an important role in
image processing since the beginning of the digital
image revolution (Pratt, 1978). Thus, many well-
known techniques for image sharpening exist today
and are readily available in most commercial
software packages.
Edge detection is a fundamental tool used in
most image processing applications to obtain
information from the images and frames. This
process detects the boundaries of the objects and
separates them from the background of the image.
Digital image enhancement techniques are
concerned with the improvement of the quality of
the digital image. The principal objective of
enhancement techniques is to process an image so
that the result is more suitable than the original
image for a specific application. Image enhancement
is usually done simultaneously with detection of
features such as edges and peaks. Tools of linear
systems have been used to solve many of the image
enhancement applications. Nowadays, a new
understanding has emerged that linear approaches
are not well suited or even fail to solve problems
involving geometrical aspects of the image. Thus,
there is a need for nonlinear geometric approaches.
A powerful nonlinear methodology that can
successfully address the image sharpening problem
is mathematical morphology (Maragos, 2005).
In this paper, we propose a novel approach for
effectively sharpening blurred images. Our strategy
is that if we can detect the edges and locate their
position in the image, then we are able to increase
the contrast of these edges by applying a
morphological filter at these locations only.
Section 2 introduces the threshold decomposition
and the method used for edge detection.
Morphological filtering for image sharpening is
explained in Section 3. Section 4 will present in
detail the proposed sharpening filter. Then, this
proposed filter is tested on several examples and its
performance is compared with that of traditional
40
A. Mahmoud T. and Marshall S. (2007).
THRESHOLD DECOMPOSITION DRIVEN ADAPTIVE MORPHOLOGICAL FILTER FOR IMAGE SHARPENING.
In Proceedings of the Second International Conference on Computer Vision Theory and Applications - IFP/IA, pages 40-45
Copyright
c
SciTePress
sharpener-type filters. Finally, Section 5 contains
some concluding remarks.
2 BACKGROUND
2.1 Threshold Decomposition
Threshold decomposition is a powerful theoretical
tool used in image analysis. Introduced by Fitch in
(Fitch et al., 1984) and later modified by Arce in
(Arce, 1998) and Paredes in (Paredes and Arce,
1999). Consider an integer-valued set of samples
X
1
, X
2
, … , X
N
forming the vector X = [ X
1
, X
2
, … ,
X
N
]
T
where X
i
{-M, … , -1, 0, 1, … , M}. The
threshold decomposition of X amounts to
decomposing this vector into 2M binary vectors
x
-M+1
, … , x
0
, …, x
M
, where the ith element of x
m
is
defined by
<
==
mXif1
mXif1
)
i
(X
m
T
m
i
x
i
i
(1)
where T
m
(.) is referred to as the threshold operator.
The above threshold decomposition is reversible,
such that if a set of threshold signals is given, each
of the samples in X can be exactly reconstructed as
+=
=
M
1Mm
m
ii
x
2
1
X
(2)
Thus, an integer-valued discrete-time signal has a
unique threshold signal representation, and vice
versa.
2.2 Edge Detection
Edge detection is a fundamental tool used in most
image processing applications. This process detects
outlines of an object and boundaries between objects
and the background in the image.
An edge-detection filter can be used to improve
the appearance of blurred images or video streams.
The Prewitt operator (Prewitt, 1970), similar to the
Sobel, Robinson and some other operators
approximates the first derivatives of the image. They
are sometimes called compass operators because of
the ability to determine gradient direction. The
gradient is estimated in 4 (for a 3x3 mask) possible
directions with a difference of 90
o
between each
direction and the other. These 4 operators will be
represented by 4 (3x3 mask) respectively.
=
111
DDD
111
h
2101
=
1D1
1D1
1D1
h
2
1
0
2
=
111
DDD
111
h
2103
=
1D1
1D1
1D1
h
2
1
0
4
where g = { D
0
, D
1
, D
2
} is the Structuring element
used in the mathematical morphology and will be
explained later.
By the aid of the threshold decomposition
described above, and for each level, the edges are
detected by searching for the 4 masks of the Prewitt
operators. Thus the sharpening filter is applied only
on these detected edges rather than all the pixels of
the image.
3 IMAGE SHARPENING BY
MORPHOLOGICAL
FILTERING
3.1 Introduction to Mathematical
Morphology
Kramer in (Kramer and Bruckner, 1975) defines a
non-linear transformation for sharpening digitized
gray-scale images. The transformation replaces the
gray value at a pixel by either the minimum or the
maximum of the gray values in its neighborhood, the
choice depending on which one is closer in value to
the original gray value.
In mathematical morphology (Serra, 1982), the
transformation that replaces the gray value at a pixel
by the maximum of the gray values in its
neighborhood is known as the gray-scale dilation
image operator.
(f
g)
[
]
)x(g)(f)x(
2
R
μ
μ
μ
+
=
(3)
in which function f (x), f : x
R
2
f (x)
R is the
original image, and g (x), g : x
R
2
g (x)
R is
THRESHOLD DECOMPOSITION DRIVEN ADAPTIVE MORPHOLOGICAL FILTER FOR IMAGE SHARPENING
41
the structuring element implicitly defining the
weighted neighborhood.
Similarly, the transformation that replaces the
gray value at a pixel by the minimum of the gray
values in its neighborhood is known as the gray-
scale erosion image operator
(f Θ g)
[]
)x(g)(f)x(
2
R
=
μ
μ
μ
(4)
Note that the dilation operator is extensive:
(f g) )x(f)x( and the erosion operator is
anti-extensive:
(f Θ g) )x(f)x( .
3.2 Contrast Enhancement
Consider a gray-scale image f (x) and a structuring
element g containing the origin. Kramer in (Kramer
and Bruckner, 1975), and then redefined by
Schavemaker in (Schavemaker et al., 2000), used the
following discrete nonlinear filter to enhance the
local contrast of f by sharpening its edges:
ψ
(f) [x] =
(f
g)[x]
if f [x] >
((f
g)[x] + (f Θ g)[x])/2
(f Θ g)[x] (5)
if f [x] < ((f
g)[x] + (f Θ g)[x])/2
f [x] otherwise
At each pixel x, the output value of this filter toggles
between the value of the dilation of f by g (i.e., the
maximum of f inside the moving window g centred at
x) and the value of its erosion by g (i.e., the minimum
of f within the same window) according to which
closer to the input value f (x). If the value of the
dilation of f by g equals the value of its erosion by g,
the output value will be the same as the input.
3.3 Structuring Element Selection
In this paper, we will focus on two types of
structuring element in order to sharpen a gray-scale
image.
Firstly, Kramer in (Kramer and Bruckner, 1975)
uses flat structuring elements for sharpening
digitized gray-scale images.
Secondly, Van den Boomgaard in (Van den
Boomgaard et al., 1996) and Schavemaker in
(Schavemaker et al., 2000) have shown that all image
operators using concave structuring elements have
sharpening properties.
In this paper, it will be shown that these two
structuring elements have near sharpening
behaviour, and that the flat structuring elements are
slightly preferable to that of the parabolic concave
structuring ones.
4 THE PROPOSED SHARPENING
FILTER AND EXPERIMENTAL
RESULTS
The sequence of applying the proposed filter will be
explained before introducing the experimental
results. First, the blurred image is digitized by the
threshold decomposition method introduced in
section 2.1. On each level, we search for the 4
possible edge directions explained in section 2.2. We
have two types of structuring elements: the flat
structuring element and the parabolic concave
structuring element. After deciding the type of the
structuring element, the nonlinear discrete filter
introduced in section 3.2 is used to sharpen these
detected edges only, rather than the whole images.
This section presents application results for the
sharpening operator using flat and parabolic concave
structuring elements in the discrete domain. The
performance of the proposed filter is compared with
a number of sharpener-type filters including high-
pass sharpener, modified high-pass sharpener
(Fischer et al., 2002), the lower-upper-middle
(LUM) filter (Hardie and Boncelet, 1993), the
comparison and selection (CS) filter (Lee and Fam,
1987) and the unsharp masking technique.
The normalized mean square error (NMSE) is
used to give a quantitative evaluation on the filtering
results.
Our proposed filter is tested on some examples.
Figures (a) are the Gaussian blurred test images.
Figures (b), (c), (d), (e) and (f) show the sharpened
images after applying the high-pass sharpener,
modified high-pass sharpener, LUM sharpener, CS
sharpener and the unsharp masking respectively. As
mentioned above, there are two types of structuring
elements. Figures (g) show the sharpened images
after applying the proposed edge detected, parabolic
concave structuring element morphological filter,
while Figures (h) show the sharpened images after
applying the proposed, flat structuring element
morphological filter on the detected edges.
Table 1 and Table 2 show the NMSE as a
quantitative comparison between the above
mentioned sharpening techniques. The output of
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
42
each filter is evaluated by comparing its estimate to
the original image.
Table 1: NMSE for different sharpening-type filters.
Sharpener Filter
Lenna
Peppers
High-pass
sharpener
0.0132 0.0149
Modified high-pass
sharpener
0.0120 0.0138
LUM
sharpener
0.0106 0.0121
CS
sharpener
0.0267 0.0317
Unsharp
masking
0.0127 0.0144
Proposed edge detected
concave structuring
element morphological
filter
0.0082 0.0070
Proposed edge detected
flat structuring element
morphological filter
0.0081 0.0069
Table 2: NMSE for different sharpening-type filters.
Sharpener Filter
Walk Bridge
Girl
High-pass
sharpener
0.0206 0.0137
Modified high-pass
sharpener
0.0187 0.0117
LUM
sharpener
0.0168 0.0113
CS
sharpener
0.0388 0.0271
Unsharp
masking
0.0195 0.0129
Proposed edge detected
concave structuring
element morphological
filter
0.0143 0.0087
Proposed edge detected
flat structuring element
morphological filter
0.0141 0.0087
5 CONCLUSIONS
In this paper, a new image sharpening filter based on
morphological filters was presented. Edges are first
detected through threshold decomposition. Then, we
choose the type of the structuring element from the
flat or the parabolic concave structuring elements.
Both give good results, but the flat structuring
element was found to perform slightly better. Thus,
the threshold decomposition guided adaptive filters
have the ability to sharpen a blurred image.
Experimental results and associated statistics have
indicated that the proposed algorithm provides a
significant improvement over many other well-
known sharpener-type filters in the aspects of edge
and fine detail preservation, as well as minimal
signal distortion.
REFERENCES
Arce, G. R., 1998. A general weighted median filter
structure admitting negative weights. IEEE Trans.
Signal Processing 46 (12), 3195-3205.
Blackledge, J., 1989. Quantitative Coherent Imaging,
Academic Press. London.
Fischer, M., Paredes, J. L., Arce, G. R., 2002. Weighted
median image sharpeners for the world wide web.
IEEE Trans. Image Processing 11 (7), 717-727.
Fitch, J. P., Coyle, E. J., Gallagher, N. C., 1984. Median
filtering by threshold decomposition. IEEE Trans.
Acoustic, Speech and Signal Processing, 32 (6), 1183–
1188.
Hardie, R. C., Boncelet, C. G., 1993. LUM filters: A class
of rank-order-based filters for smoothing and
sharpening. IEEE Trans. Signal Processing 41 (3),
1061-1076.
Kramer, H. P., Bruckner, J. B., 1975. Iterations of a non-
linear transformation for enhancement of digital
images. Pattern Recognition 7, 53–58.
Lee, Y. H., Fam, A. T., 1987. An edge gradient enhancing
adaptive order statistic filter. IEEE Trans. Acoustic,
Speech, Signal Processing 35, 1061-1076.
Maragos, P., 2005. Morphological filtering for image
enhancement and feature detection, in: Bovik, A. C.
(Eds.), The Image and Video Processing Handbook,
Elsevier Academic Press. pp 135-156.
Paredes, J. L., Arce, G. R., 1999. Stack filter, stack
smoothers, and mirrored threshold decomposition.
IEEE Trans. Signal Processing 47 (10), 2757-2767.
Pitas, I., 1993. Digital Image Processing Algorithms,
Prentice Hall.
Pratt, W. K., 1978. Digital Image Processing, Wiley. New
York.
Prewitt, J. M., 1970. Object enhancement and extraction.
Picture Processing and Psychopictorics, 75-149.
Schavemaker, J. G., Reinders, M. J., Gerbrands, J. J.,
Backer, E., 2000. Image sharpening by morphological
filtering. Pattern Recognition 33, 997–1012.
Serra, J., 1982. Image Analysis and Mathematical
Morphology, Academic Press. New York.
Van den Boomgaard, R., Dorst, L., Makram-Ebeid, S.,
Schavemaker, J. G., 1996. Quadratic structuring
functions in mathematical morphology. in: Maragos,
P., Schafer, R. W., Butt, M. A. (Eds.), Mathematical
Morphology and its Applications to Image and Signal
Processing, Kluwer Academic Publishers. pp. 147-
154.
THRESHOLD DECOMPOSITION DRIVEN ADAPTIVE MORPHOLOGICAL FILTER FOR IMAGE SHARPENING
43
(a)
(b)
(c)
(d)
(e)
(f)
Figure 1: (a) Blurred Lenna (b) High-pass sharpened
(c) Modified high-pass sharpened (d) LUM sharpened
(e) CS sharpened (f) Unsharp mask sharpened.
(g)
(h)
Figure 1: (g) Proposed edge detected concave structuring
element morphological filter (h) Proposed edge detected
flat structuring element morphological filter.
(a)
(b)
(c)
(d)
(e)
(f)
Figure 2: (a) Blurred Peppers (b) High-pass sharpened
(c) Modified high-pass sharpened (d) LUM sharpened
(e) CS sharpened (f) Unsharp mask sharpened.
(g)
(h)
Figure 2: (g) Proposed edge detected concave structuring
element morphological filter (h) Proposed edge detected
flat structuring element morphological filter
.
VISAPP 2007 - International Conference on Computer Vision Theory and Applications
44
(a)
(b)
(c)
(d)
(e)
(f)
Figure 3: (a) Blurred Rectangle (b) High-pass sharpened
(c) Modified high-pass sharpened (d) LUM sharpened
(e) CS sharpened (f) Unsharp mask sharpened.
(g)
(h)
Figure 3: (g) Proposed edge detected concave structuring
element morphological filter (h) Proposed edge detected flat
structuring element morphological filter.
(a)
(b)
(c)
(d)
(e)
(f)
Figure 4: (a) Blurred Girl (b) High-pass sharpened
(c) Modified high-pass sharpened (d) LUM sharpened
(e) CS sharpened (f) Unsharp mask sharpened.
(g)
(h)
Figure 4: (g) Proposed edge detected concave structuring
element morphological filter (h) Proposed edge detected
flat structuring element morphological filter
.
THRESHOLD DECOMPOSITION DRIVEN ADAPTIVE MORPHOLOGICAL FILTER FOR IMAGE SHARPENING
45