首页 > 其他分享 >Tutorial on Gabor Filters

Tutorial on Gabor Filters

时间:2022-12-29 21:55:49浏览次数:43  
标签:frac Gabor filter Filters theta alpha hat Tutorial

1 The Temporal (1-D) Gabor Filter

Gabor filters can serve as excellent band-pass filters for unidimensionnal signals (e.g., speech)
A complex Gabor filter is defined as the product of a Gaussian kernel times a complex sinusoid, i.e.

\[g(t)=ke^{j\theta}w(at)s(t) \]

where
\(w(t)=e^{-\pi t^{2}}\)
\(s(t)=e^{j(2\pi f_{0}t)}\)
Here \(k,\theta,f_{0}\) are filter parameters. We can think of the complex Gabor filter as two out of phase filters continently allocated in the real and complex part of a complex function, the real part holds the filter

\[g_{r}(t)=w(t)sin(2\pi f_{0}t+\theta) \]

and the imaginary part holds the filter

\[g_{i}(t)=w(t)cos(2\pi f_{0}t+\theta) \]

1.1 Frequency Response

Taking the Fourier transform

\[\hat{g}(f)=ke^{j\theta}\int_{-\infty}^{\infty}e^{-j2\pi ft}w(at)s(t)dt=\frac{k}{a}e^{j\theta}\hat{w}(\frac{f-f_{0}}{a}) \]

where
\(\hat{w}(f)=w(f)=e^{-\pi f^{2}}\)

1.2 Gabor Energy Filters

The real and imaginary components of a complex Gabor filter are phase sensitive, i.e., as a consequence their response to a sinusoid is another sinusoid (Fig 1.2).
In the frequency domain, the magnitude of the response to a particular frequency is simply the magnitude of the complex Fourier transform, i.e.

\[||g(f)||=\frac{k}{a}\hat{w}(\frac{f-f_{0}}{a}) \]

Note this is a Gaussion function centered at \(f_{0}\) and with width proportional to \(alpha\).

Fig 1. Top: An input signal. Second: Output of Gabor filter (cosine carrier). Third: Output of Gabor Filter in quadrature (sine carrier). Fourth: Output of Gabor Energy Filter.

1.2.1 Bandwidth and Peak Response

Thus the peak filter response is at \(f_{0}\). To get the half-magnitude bandwidth \(\Delta_{f}\) note

\[\hat{w}(\frac{f-f_{0}}{a})=e^{-\pi\frac{f-f_{0}}{\alpha^2}}=0.5 \]

Thus the half peak magnitude is achieved for

\[f-f_{0}\pm\sqrt{\alpha^{2}log2\pi}=0.4697\alpha\approx 0.5\alpha \]

Thus the half-magnitude bandwidth is approximately equal to \(\alpha\).

1.3 Eliminating the DC response

Depending on the value of \(f_{0}\) and \(alpha\) the filter may have a large DC response. A popular approach to get a zero DC response is to subtract the output of a low-pass Gaussian filter

\[h(t)=g(t)-cw(bt)=ke^{j\theta}w(at)s(t)-cw(bt) \]

Thus

\[\hat{h}(f)=\hat{g}(f)-\frac{c}{b}\hat{w}(\frac{f}{b}) \]

To get a zero DC response we need

\[\frac{c}{b}\hat{w}(0)=\hat{g}(0) \]

\[c=b\hat{g}(0)=b\frac{k}{a}e^{j\theta}\hat{w}(\frac{f_{0}}{\alpha}) \]

Thus

\[h(t)=ke^{j\theta}(w(\alpha t)s(t)-\frac{b}{a}\hat{w}(\frac{f_{0}}{\alpha})w(bt)) \]

\[\hat{h}(f)=\frac{k}{a}e^{j\theta}(\hat{w}(\frac{f-f_{0}}{\alpha})-\hat{w}(\frac{f_{0}}{a})\hat{w}(\frac{f}{b})) \]

It is convenient, to let \(b=a\), in which case

\[h(t)=ke^{j\theta}w(\alpha t)(s(t)-\hat{w}(\frac{f_{0}}{a}) \]

\[\hat{h}(f)=\frac{k}{a}e^{j\theta}(\hat{w}(\frac{f-f_{0}}{\alpha})-\hat{w}(\frac{f_{0}}{a})\hat{w}(\frac{f}{a})) \]

2 The Spatial (2-D) Gabor Filter

Here is the formula of a complex Gabor function in space domain

\[g(x,y)=s(x,y)w_{r}(x,y) \]

where \(s\) is a complex sinusoid, known as the carrier, and \(w_{r}\) is a 2-D Gaussian-shaped function, known as the envelope.

2.1 The complex sinusoid carrier

标签:frac,Gabor,filter,Filters,theta,alpha,hat,Tutorial
From: https://www.cnblogs.com/prettysky/p/17013631.html

相关文章