# Difference between Gabor filter implementations

I was reading a paper and came across this:

I'd like to implement this in matlab, therefore I initially searched for a premade implementation. I stumbled upon this: http://www.mathworks.com/matlabcentral/fileexchange/5237-2d-gabor-filterver123 . Though they use a different equation. My question now is: what is the difference between this equation and the one from the paper I read ?

• I'm not that there is a difference. What exactly are you referring to? – Phonon Sep 19 '12 at 15:40
• Well it seems to me that they are using different equations. The paper is using the one that I put in the post above, and the matlab code found on mathworks uses a different equation I think (you can see the equation in the comments of the code). – Olivier_s_j Sep 20 '12 at 6:39
• OK, I was looking at the wrong thing, sorry. – Phonon Sep 20 '12 at 15:14

In a practical point of view, $\cos(x)+i\sin(x)$ allows for easy separation of real and imaginary. On the other hand, $\exp(ix)$ makes it easier to deal with Gaussian since $\exp(x)\cdot\exp(y)=\exp(x+y)$.