UvA-DARE is a service provided by the library of the University of Amsterdam (http
s
://dare.uva.nl)
UvA-DARE (Digital Academic Repository)
Fast Anisotropic Gauss Filtering
Geusebroek, J.M.; Smeulders, A.W.M.; van de Weijer, J.
Publication date
2002
Published in
7th European Conference on Computer Vision (ECCV)
Link to publication
Citation for published version (APA):
Geusebroek, J. M., Smeulders, A. W. M., & van de Weijer, J. (2002). Fast Anisotropic Gauss
Filtering. In A. Heyden, G. Sparr, M. Nielsen, & P. Johansen (Eds.),
7th European Conference
on Computer Vision (ECCV)
(Vol. 1, pp. 99-112). Springer Verlag.
General rights
It is not permitted to download or to forward/distribute the text or part of it without the consent of the author(s)
and/or copyright holder(s), other than for strictly personal, individual use, unless the work is under an open
content license (like Creative Commons).
Disclaimer/Complaints regulations
If you believe that digital publication of certain material infringes any of your rights or (privacy) interests, please
let the Library know, stating your reasons. In case of a legitimate complaint, the Library will make the material
inaccessible and/or remove it from the website. Please Ask the Library: https://uba.uva.nl/en/contact, or a letter
to: Library of the University of Amsterdam, Secretariat, Singel 425, 1012 WP Amsterdam, The Netherlands. You
will be contacted as soon as possible.
Download date:09 Aug 2022
Fast Anisotropic Gauss Filtering
Jan-Mark Geusebroek
?
, Arnold W. M. Smeulders, and Joost van de Weijer
Intelligent Sensory Information Systems, Department of Computer Science,
University of Amsterdam, Kruislaan 403, 1098 SJ Amsterdam, The Netherlands;
geusebroek@science.uva.nl
Abstract. We derive the decomposition of the anisotropic Gaussian in
a one dimensional Gauss filter in the x-direction followed by a one di-
mensional filter in a non-orthogonal direction ϕ. So also the anisotropic
Gaussian can be decomposed by dimension. This appears to be extremely
efficient from a computing perspective. An implementation scheme for
normal convolution and for recursive filtering is proposed. Also directed
derivative filters are demonstrated.
For the recursive implementation, filtering an 512 × 512 image is per-
formed within 65 msec, independent of the standard deviations and ori-
entation of the filter. Accuracy of the filters is still reasonable when
compared to truncation error or recursive approximation error.
The anisotropic Gaussian filtering method allows fast calculation of edge
and ridge maps, with high spatial and angular accuracy. For tracking
applications, the normal anisotropic convolution scheme is more advan-
tageous, with applications in the detection of dashed lines in engineering
drawings. The recursive implementation is more attractive in feature
detection applications, for instance in affine invariant edge and ridge de-
tection in computer vision. The proposed computational filtering method
enables the practical applicability of orientation scale-space analysis.
1 Introduction
One of the most fundamental tasks in computer vision is the detection of edges
and lines in images. The detection of these directional structures is often based on
the local differential structure of the image. Canny’s edge detector examines the
magnitude of the first order image derivatives [3]. A well-founded approach for
line detection is given by [16, 20], where line structures are detected by examining
the eigenvectors of the Hessian matrix, the Hessian being given by the local
second order derivatives. Robust measurement of image derivatives is obtained
by convolution with Gaussian derivative filters, a well known result from scale-
space theory [6, 13, 15, 21].
The difficulty of edge and line detection is emphasized when the structures
run close together or cross each other, as is the case in engineering drawings or
two-dimensional projections of complex (3D) scenes. In these cases, isotropic fil-
tering strategies as used in e.g. [2, 3, 8, 12, 20] are not sufficient. Isotropic smooth-
ing causes parallel lines to be blurred into one single line. Crossing lines are not
?
This work was supported by the ICES Multimedia Information Analysis Project
well detected by isotropic filters [17], due to the marginal orientation selectivity
of the Gaussian filter.
The task of edge and line detection is considered not trivial when disturbing
influences have to be ignored, like shadows and shading, gaps in dashed lines,
object borders locally blending together, partly occlusion of the object, or clut-
ter in the background. In these cases, one would often like to have a detection
method which ignores the distorting data aside the edge or line, while accu-
mulating evidence of the edge or line data along its orientation. Hence, taking
advantage of the anisotropic nature of lines and edges [1, 10].
The use of isotropic Gaussians is for historical reasons, imposed by simplicity
of derivation and efficiency in computation [13]. The assumption of isotropy
for front-end vision [6, 13, 15, 21] does not imply the scale-space operator to be
isotropic, rather imposes the complete sampling of all possible orientations of
the scene. The notion of orientation sampling suggest a combined scale and
orientation space [12, 14, 22]. For a linear orientation scale-space, the anisotropic
Gaussian is the best suited causal filter. We propose a method for fast filtering
by anisotropic Gaussian’s to construct an orientation scale-space.
Orientation analysis is often approached by steerable filters. Freeman and
Adelson [7] put forward the conditions under which a filter can be tuned to a
specific orientation by making a linear combination of basis filters. Their analy-
sis included orientation tuning of the xy-separable first order isotropic Gaussian
derivative filter. According to their framework, no exact basis exists for rotat-
ing an anisotropic Gaussian. Van Ginkel et al. proposed a deconvolution scheme
for improving the angular resolution of the Gaussian isotropic filter. Under a
linearity assumption on the input image, a steerable filter with good angular
resolution is obtained. The method involves a Fourier based deconvolution tech-
nique, which is of high computational complexity. Perona [17] derived a scheme
for generating a finite basis which approximates an anisotropic Gaussian. The
scheme allowed both steering and scaling of the anisotropic Gaussian. However,
the number of basis filters is large, and the basis filters are non-separable, re-
quiring high computational performance.
We show the anisotropic Gaussian filter to be separable along two direc-
tions, not necessarily orthogonal. One of the axes is in a fixed, but in a freely
selectable direction. The latter axis depends on the filter parameters (σ
u
, σ
v
, θ),
the standard deviations and orientation, respectively. We show the resulting
one-dimensional filters to be Gaussian filters. Hence, fast algorithms [4, 5, 23,
24] can be used to calculate the orientation smoothed image and its deriva-
tives. Van Vliet and Young propose [23, 24] a recursive implementation of one-
dimensional Gaussian filters. This is a great advantage over [5], as combining the
one-dimensional filters into two-dimensional Gaussians will not introduce bias
along the filter directions. The recursive filters need only 7 multiplications and
6 additions per pixel, independent of the standard deviation σ of the Gaussian
filter. Moreover, the filter coefficients are simple to calculate.
In this paper, we show the decomposition of the anisotropic Gaussian in
two Gaussian line filters in non orthogonal directions (Sect. 2). Choosing the
x-axis to decompose the filter along turns out to be extremely efficient from a
computing perspective. We combine the decomposition with the recursive algo-
rithms proposed in [23, 24], yielding a constant calculation time with respect to
the Gaussian scales and orientation (Sect. 3). We give timing results and com-
pare accuracy with two-dimensional convolution in Sect. 4. Implementation of
Gaussian derivative filters is given in Sect. 5.
2 Separation of Anisotropic Gaussian
A simple case of the isotropic Gaussian convolution filter in two dimensions is
given by
g
◦
(x, y; σ) =
1
2πσ
2
exp
½
−
1
2
µ
x
2
+ y
2
σ
2
¶¾
. (1)
Anisotropy is obtained when scaling differently in the x- and y-direction. Then,
an elliptic Gaussian with axes aligned along the coordinate system (see Fig. 1a)
is given by
g
⊥
(x, y; σ
x
, σ
y
) =
1
2πσ
x
σ
y
exp
½
−
1
2
µ
x
2
σ
2
x
+
y
2
σ
2
y
¶¾
. (2)
Rotation of the coordinate system (x, y) over θ,
µ
u
v
¶
=
·
cos θ sin θ
−sin θ cos θ
¸µ
x
y
¶
(3)
results in the general case of oriented anisotropic Gaussian (Fig. 1b),
g
θ
(x, y; σ
u
, σ
v
, θ) =
1
2πσ
u
σ
v
exp
(
−
1
2
Ã
(x cos θ + y sin θ)
2
σ
2
u
+
(−x sin θ + y cos θ)
2
σ
2
v
!)
(4)
the u-axis being in the direction of θ, and the v-axis being orthogonal to θ.
From standard Fourier theory we have the convolution theorem,
f(x, y) ∗ h(x, y)
F
⇔ F (ω
x
, ω
y
)H(ω
x
, ω
y
) . (5)
A linear filter is separable into two subsequent convolutions iff its Fourier trans-
form can be written as a multiplication of two functions, one depending on ω
x
,
the other depending on ω
y
,
h(x, y) = h
x
(x) ∗ h
y
(y)
F
⇔ H(ω
x
, ω
y
) = H
ω
x
(ω
x
)H
ω
y
(ω
y
) . (6)
The Fourier transform of g
θ
(.) (Eq. (4)) is given by
G
θ
(ω
x
, ω
y
; σ
u
, σ
v
, θ) =
exp
½
−
1
2
³
(ω
x
cos θ + ω
y
sin θ)
2
σ
2
u
+ (−ω
x
sin θ + ω
y
cos θ)
2
σ
2
v
´
¾
. (7)
(a) (b) (c)
Fig. 1. Ellipse and its axes systems. An example of an anisotropic Gaussian with aspect
ratio 1:2 and orientation θ =
π
4
. a. Cartesian xy-aligned Gaussian. b. Principal axes
uv-aligned Gaussian. c. uv-aligned Gaussian in a non-orthogonal xt-axes system. Axis
t is rotated over ϕ ≈
π
6
with respect to the x-axis.
The exponential is separable into two products if its argument is separable into
sums (e
a+b
= e
a
e
b
). From Eq. (7) it is easy to derive that the anisotropic Gaus-
sian may be separated along the major axes u and v with (u, v) given by Eq. (3),
G
θ
(ω
x
, ω
y
; σ
u
, σ
v
, θ) = exp
½
−
1
2
¡
ω
u
2
σ
2
u
+ ω
v
2
σ
2
v
¢
¾
. (8)
As we are interested in a convenient basis from a computational perspective,
separation in u and v is uninteresting. What is needed is the decomposition
into a filter in the x-direction and a filter along another direction. Therefore, we
consider
(ω
x
cos θ + ω
y
sin θ)
2
σ
2
u
+ (−ω
x
sin θ + ω
y
cos θ)
2
σ
2
v
(9)
as the quadratic form in ω
x
and ω
y
,
a
11
ω
x
2
+ 2a
12
ω
x
ω
y
+ a
22
ω
y
2
(10)
where the coefficients are given by
a
11
= σ
2
u
cos
2
θ + σ
2
v
sin
2
θ
a
12
=
¡
σ
2
u
− σ
2
v
¢
cos θ sin θ
a
22
= σ
2
v
cos
2
θ + σ
2
u
sin
2
θ . (11)
We aim at separating the anisotropic Gaussian filter into a filter in the x-
direction, followed by a filter along a line t : y = x tan ϕ,
f(x, y) ∗ h(x, y) = f(x, y) ∗ h
x
(x) ∗ h
ϕ
(t)
F
⇔
F (ω
x
, ω
y
)H(ω
x
, ω
y
) = F (ω
x
, ω
y
)H
x
(ω
x
)H
ϕ
(ω
ϕ
) (12)