title: How to apply frequency filter on fftw output
body: <p>I get the 2d FFTW output of an image using <code>fftw_plan_dft_2d()</code>. As I understand it, the output represents a 2D array (<em>width</em> x <em>height</em>) of complex numbers.</p>
  
  <p>Can someone please explain to me how exactly I should interpret this array? What does each point represent? And what does the value of each point represent?</p>
  
  <p>If I wanted to apply a high-pass filter, how would I do that? I tried the code below, but all I get is overlapped shifted image when I do reverse FFT.</p>
  
  <pre><code>for (y = 0; y &lt; height; y++)
  {
      for (x = 0; x &lt; width; x++)
      {
          xx = ABS(x - width / 2);
          yy = ABS(y - height / 2);
          if (sqrt(xx * xx + yy * yy) &gt; width / 2)
          {
              fft[y * width + x][0] = 0;
              fft[y * width + x][1] = 0;
          }
     }
  </code></pre>