If the standard form of a Gabor function is as follows,

$$ g_{\lambda, \theta,\varphi, \sigma,\gamma}(x, y)=\exp\left(-\frac{x'^2+\gamma^2y'^2}{2\sigma^2}\right)\cos\left(2\pi\frac{x'}{\lambda}+\varphi\right)$$

where $$ x'=x\cos\theta+y\sin\theta\\ y'=-x\sin\theta+y\cos\theta$$ How can I find the Center Frequency from this equation?

  • $\begingroup$ That is only the real part of a Gabor filter. Is that what you actually meant or did you forget the imaginary one? $\endgroup$
    – Tendero
    May 28, 2016 at 13:30
  • $\begingroup$ @Tendero, I am actually working with crack detection algorithms. So, I am trying to implement a Gabor Filter Bank. I am seeing that this guy youtube.com/watch?v=-NZakhhB_Do is only real part. So, I understood that the real part is only what I need. What do you say? $\endgroup$
    – user18425
    May 28, 2016 at 16:11
  • $\begingroup$ I was just checking that you hadn't forgotten about the imaginary one, just that $\endgroup$
    – Tendero
    May 28, 2016 at 16:16
  • $\begingroup$ @Tendero, this is related dsp.stackexchange.com/questions/31061/… $\endgroup$
    – user18425
    May 28, 2016 at 16:44
  • $\begingroup$ @Tendero this is also related dsp.stackexchange.com/questions/31046/… $\endgroup$
    – user18425
    May 28, 2016 at 16:47

1 Answer 1


The center frequency of a Gabor function is given by the reciprocal of its wavelength, which in turn is determined by the value of the parameter $\lambda$ in the equation.

To find the value of $\lambda$, we can rewrite the cosine term as follows:

$$\cos\left(2\pi\frac{x'}{\lambda}+\varphi\right) = \cos\left(\frac{2\pi x'}{\lambda} \right)\cos(\varphi) - \sin\left(\frac{2\pi x'}{\lambda} \right)\sin(\varphi)$$

Substituting the expressions for $x'$ and $y'$ in terms of $x$ and $y$ yields:

$$\cos\left(2\pi\frac{x\cos\theta+y\sin\theta}{\lambda}+\varphi\right) = \cos\left(\frac{2\pi x\cos\theta+2\pi y\sin\theta}{\lambda} \right)\cos(\varphi) - \sin\left(\frac{2\pi x\cos\theta+2\pi y\sin\theta}{\lambda} \right)\sin(\varphi)$$

Then, we can use the trigonometric identity $\cos(a+b) = \cos(a)\cos(b) - \sin(a)\sin(b)$ to write:

$$\cos\left(2\pi\frac{x\cos\theta+y\sin\theta}{\lambda}+\varphi\right) = \cos\left(\frac{2\pi x}{\lambda}\cos\theta+\frac{2\pi y}{\lambda}\sin\theta\right)\cos(\varphi) - \sin\left(\frac{2\pi x}{\lambda}\cos\theta+\frac{2\pi y}{\lambda}\sin\theta\right)\sin(\varphi)$$

We can now recognize the expression inside the cosine and sine functions as the dot product of the vector $(x,y)$ with the vector $(\cos\theta,\sin\theta)$, and write:

$$\cos\left(2\pi\frac{x\cos\theta+y\sin\theta}{\lambda}+\varphi\right) = \cos\left(\frac{2\pi}{\lambda}(x\cos\theta+y\sin\theta)\right)\cos(\varphi) - \sin\left(\frac{2\pi}{\lambda}(x\cos\theta+y\sin\theta)\right)\sin(\varphi)$$

Finally, we can use the fact that the wavelength $\lambda$ corresponds to a full period of the cosine term, which occurs when the argument of the cosine function increases by $2\pi$, to obtain:

$$\frac{2\pi}{\lambda} = 1$$

Therefore, the center frequency is given by:

$$f_c = \frac{1}{\lambda} = \frac{1}{2\pi}$$

Note that the center frequency is independent of the other parameters of the Gabor function, such as the orientation $\theta$, the phase $\varphi$, and the width parameters $\sigma$ and $\gamma$.

  • $\begingroup$ You are saying that lambda is always 2pi? But it’s a parameter settable by the user! $\endgroup$ Aug 7 at 13:49
  • $\begingroup$ @CrisLuengo, Please feel free to edit my poster answer. I made it a community wiki. $\endgroup$
    – user366312
    Aug 7 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.