Strong result with cuFFT

Hi everyone,

I need to make 2d convolution with FFT

So my plan is: iFFT( FFT(A) * FFT (B))

I have tried it and for some reason the FFT center is not on the right place (the image is devised in 4 part).

So I have try iFFT( FFT(A)) and iFFT( FFT(B)) and have well the good result a and B

If someone has an idée or explication!

Thanks in advance for your help.

PS : Sorry for my lame English, I hope you’ll understand my problems.


Sounds like you need to do an fftshift function on your 2D data.

Of course if you perform the adequate transformation on your data everything will go at the correct location (shifted).

BUT, it does not souds fair that ifft(fft(A)*fft(B)) does not correspond to a single image.

I don’t think this is unique to CUFFT.

This may be useful reading:

Tanks a lot for this link.

So, if we have a odd number of image we don’t need shifting, but for an even number of image we need shifting