Re: Fast 2d convolution using FFTW



if you know that the FT of a gaussian is a gaussian, then why do fft of
kernel?
just multiply the fft of image with invented gaussian in fourier domain,
then IFFT

all you are doing is lo pass filtering - so you are only selecting the low
frequency components of image right?

so you are selecting all fourier components a certain distance from origin
(dc spatial frequency), and throwing away rest, 'apodising' higher frequency
components so you don't get ringing...

what you need to work out is output from the FFTW program - where is origin?
also zero padding always stinks - you may have to smooth abrupt transistion
into zeros, otherwise get ringing convolved into image.

A trick for getting origin right is to premultiply with a comb (-1)^(x+y)...
(alternate the sign of each pixel, both horizontally and vertically) on both
sides of fft

good luck



.



Relevant Pages

  • Re: Scaling the fft
    ... I am trying to perform an fft on some data but have been ... having trouble with the scaling of the frequency axis. ... resulting gaussian on transform is expected to have width ... Again, the troubleshooting is ...
    (comp.soft-sys.matlab)
  • Re: fft gaussian
    ... samples in frequency domain and the position of the gaussian ... my question is about the use of fft for a time domain ... %plot(xp,Yfix) % The 'not yet normalized' plot. ...
    (comp.soft-sys.matlab)
  • Re: phase of fft on matlab
    ... your idea of cleaning up the numbers close to zero ... symmetric" if you are going to ideally expect all real FFT output ... The output of the FFT will be close to gaussian over some ... 4)the FFT output magnitude decreases at a very fast rate. ...
    (comp.dsp)
  • Re: spectral peak-estimation by cross-correlation
    ... The Gaussian window was chosen to: ... the amplitudes of two non-peak bins. ... an fft size of 64 .. ...
    (comp.dsp)
  • Re: zero padding radix - 2 FFT
    ... FFT with an odd size. ... Zero padding the FFT to the next power of two ... Now zero pad to the next power of two. ...
    (comp.dsp)