0% found this document useful (0 votes)
64 views5 pages

Gabor Filters

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views5 pages

Gabor Filters

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Gabor filters

Konstantinos G. Derpanis
York University
[email protected]
Version 1.3

April 23, 2007

In this note the Gabor filter is reviewed. The Gabor filter was originally introduced
by Dennis Gabor (Gabor, 1946). The one-dimensional Gabor filter is defined as the
multiplication of a cosine/sine (even/odd) wave with a Gaussian windows (see Fig.
1), as follows,
1 x2
ge (x) = √ e− 2σ2 cos(2πω0 x) (1)
2πσ
1 x2
go (x) = √ e− 2σ2 sin(2πω0 x) (2)
2πσ
where ω0 defines the centre frequency (i.e., the frequency in which the filter yields
the greatest response) and σ the spread of the Gaussian window.
The power spectrum of the Gabor filter is given by the sum of two Gaussians
centred at ±ω0 :
2 2 2 2 2 2
kG(ω)k = e−2π σ (ω−ω0 ) + e−2π σ (ω+ω0 ) (3)
This can be reasoned as follows. The power spectrum of a sine wave are two impulses
located at ±ω0 and the power spectrum of Gaussian is a (non-normalized) Gaussian.
Multiplication in the temporal (spatial) domain is equivalent to convolution in the
frequency domain (Oppenheim, Willsky & S.H., 1997).
The uncertainty principle states that the product of the spread (i.e., uncertainty)
of a signal in the time and frequency domains must exceed or equal a fixed constant,

4t4f = c, (4)

where c1 is a constant, 4t and 4f represent the measure of the spread of the signal
in the time and frequency domains, respectively (see Fig. 2). The implication of this
1
The exact value of the constant c depends on the form of the Fourier transform used.

1
0 0
0.4

0.3
0.3

0.2
0.2
0.1
0.1
0

0
−0.1

−0.1
−0.2

−0.2 −0.3

−6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6
x x

(a) Gabor cosine (even) (b) Gabor sine (odd)

Figure 1: One-dimensional Gabor filters.

principle is that the accuracy with which one can measure a signal in one domain limits
the attainable accuracy of the measurement in the other domain. Gabor (Gabor,
1946) demonstrated that the complex Gabor filter given by,

g(x) =ge (x) + igo (x)


 
1 − x2
2
=√ e 2σ cos(2πω0 x) + i sin(2πω0 x)
2πσ
1 x2
=√ e− 2σ2 ei(2πω0 x) (5)
2πσ
attains the optimal (lower bound) compromise between the localization in the time
and frequency domains; notice that the Gaussian function is an instance of a Gabor
filter with centre frequency ω0 = 0. Note that the constituent real-valued Gabor
elementary functions (i.e., the even and odd part taken separately) do not as widely
believed minimize the joint uncertainty (Stork & Wilson, 1990). Furthermore, the
selection of a different localization measure may result in a different class of “opti-
mal” function altogether (Lerner, 1961; Stork & Wilson, 1990), casting doubt on the
primacy of the Gabor function often cited in the literature.
Daugman (Daugman, 1980; Daugman, 1985) extended the Gabor filter to two-
dimensions (see Fig. 3), as follows,
2 2
1 −1(x +y )
ge (x, y) = e 2 σx σy cos(2πωx0 x + 2πωy0 y) (6)
2πσx σy
2 2
1 −1(x +y )
go (x, y) = e 2 σx σy sin(2πωx0 x + 2πωy0 y) (7)
2πσx σy

where (ωx0 , ωy0 ) defines the centre frequency and (σx , σy ) the (potentially asymmetric)
spread of the Gaussian window.

2
ω

frequency ΔtΔf ≥ c
domain

time
domain

Figure 2: Joint localization of a signal in time and frequency domains.

For the purpose of extracting optical flow, Heeger (Heeger, 1987) utilized the
three-dimensional (space-time) Gabor filter,
2 2 2
1 − 21 ( σx + σy + σt )
ge (x, y, t) = e x y t cos(2πω
x0 x + 2πωy0 y + 2πωt0 t) (8)
(2π)3/2 σx σy σt
2 2 2
1 − 21 ( σx + σy + σt )
go (x, y, t) = e x y t sin(2πω
x0 x + 2πωy0 y + 2πωt0 t) (9)
(2π)3/2 σx σy σt

where (ωx0 , ωy0 , ωt0 ) defines the centre frequency and (σx , σy , σt ) defines the (poten-
tially asymmetric) spread of the Gaussian window.
Heeger (Heeger, 1987) demonstrated that the three-dimensional (similarly for the
two-dimensional case) Gabor filter can be built from one-dimensional separable com-
ponents. Considering the two-dimensional Gabor filter, let k be the size of the two-
dimensional convolution kernel and n be the size of an image (in pixels). The com-
plexity of the non-separable convolution of the Gabor filter is reduced from O(k 2 n2 )
to O(kn2 ).
An application of Gabor filters is in local time-frequency analysis of signals, specif-
ically, a fixed windowed Fourier transform, referred to as the Gabor transform. A
difficulty with the Gabor transform is that it is linearly independent but highly non-
orthogonal and as such cannot be easily inverted. As a result of non-orthogonality,

3
the functions, ri (n), used for reconstructing the discrete signal, f (n), are highly dis-
tinct from the Gabor functions used to recover the coefficients of the representation
(i.e., the analysis step), where the coefficients indicate how much of its corresponding
reconstruction filter, ri (n), is to be added, formally,
X
f (n) = ci ri (n) reconstruction step (10)
i

where, X
ci = f (n)gi (n) analysis step. (11)
n

If the Gabor transform were indeed orthogonal (such as the Fourier transform),
gi (n) = ri (n).

References
Daugman, J. (1980). Two-dimensional analysis of cortical receptive field profiles.
Vision Research, 20, 846–856.

Daugman, J. (1985). Uncertainty relation for resolution in space, spatial frequency,


and orientation optimized by two-dimensional visual cortical filters. Journal of
the Optical Society of America-A, 2(7), 1160–1169.

Gabor, D. (1946). Theory of communication. Journal of the Institute of Electrical


Engineers, 93, 429–457.

Heeger, D. (1987). Model for the extraction of image flow. Journal of the Optical
Society of America-A, 2(2), 1455–1471.

Lerner, R. (1961). Representation of signals. In E. Baghdady (Ed.), Lectures on


Communication System Theory chapter 10, (pp. 203–242). Mc-Graw-Hill.

Oppenheim, A., Willsky, A. & S.H., N. (1997). Signals and Systems. Upper Saddle
River, NJ: Prentice Hall.

Stork, D. & Wilson, H. (1990). Do Gabor functions provide appropriate descriptions


of visual cortical receptive fields? Journal of the Optical Society of America-A,
7(9), 1362–1373.

4
0.2

0.15

0.1

0.05

−0.05

−0.1

−0.15

−0.2
−4
−2
0 4
2
2 0
−2
44

x y

(a) Gabor cosine (even)

8
6
4
2
0

−1
1
−0.5
0.5
0
0
0.5
−0.5
1
−1
ωy
ωx

(b) Gabor power spectrum

Figure 3: Two-dimensional Gabor filters.

You might also like