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.

Mathieu

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

[url]http://www.mathworks.com/help/matlab/ref/fftshift.html[/url]

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.

[url]http://research.gcubik.com/cufftImage.html[/url]

I don’t think this is unique to CUFFT.

This may be useful reading:

http://www.mvkonnik.info/2014/06/fft-ifft-and-why-do-we-need-fftshift.html

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