title: Incorrect FFT of Gaussian kernel
body: <p>I'm trying generate the FFT of a Gaussian kernel to use in later filtering. My understanding is that the FFT of a Gaussian kernel should yield a magnitude that is visually similar to the original intensity image. Here's what I'm getting,</p>
  
  <p><img src="https://i.stack.imgur.com/BGrld.png" alt="Intensity and resultant fft"></p>
  
  <p>Here's a snippet that should reproduce this image.</p>
  
  <pre><code>import numpy as np
  import cv2
  from matplotlib import pyplot as plt
  
  ksize       = 50
  ksize       = ksize*2+1
  sigma       = 15
  fil         = cv2.getGaussianKernel(ksize,0)
  fil         = fil * fil.T
  
  fil_fft = cv2.dft(np.float32(fil),flags = cv2.DFT_COMPLEX_OUTPUT)
  fil_shift = np.fft.fftshift(fil_fft)
  
  magnitude_fil = 20*np.log(cv2.magnitude(fil_shift[:,:,0],fil_shift[:,:,1]))
  
  plt.subplot(131),plt.imshow(fil)
  plt.title('Input Image'), plt.xticks([]), plt.yticks([])
  plt.subplot(132),plt.imshow(magnitude_fil)
  plt.title('FFT (Magnitude)'), plt.xticks([]), plt.yticks([])
  plt.show()
  </code></pre>
  
  <p>Any ideas as to why I'm getting this t-shaped response would be great.</p>