title: fftw C++ inverse 2D FFT from magnitude and phase arrays
body: <p>2D FFT/IFFT implementation with FFTW.</p>
  
  <p>Currently I have an image loaded in using SFML and have decomposed it into its magnitude and phase components with <code>fftw_plan_dft_2d</code>.</p>
  
  <p>This went okay and I've checked my magnitude image against known working software and the results are correct. (<a href="http://i.imgur.com/zf367Uo.jpg" rel="nofollow">Forward FFT</a>)</p>
  
  <p>I've checked that the ifft is working by directly performing an inverse 2D FFT straight out of the forward FFT (<a href="http://i.imgur.com/PlCAqun.png" rel="nofollow">Inverse FFT</a>) using the real and imaginary output from the first FFT (there are problems with that as well somewhere, but that's for another day)</p>
  
  <p>I'm more interested in the way I should recombine the magnitude and phase to form the real and complex parts in order to perform the IFFT.</p>
  
  <p>Google returns a lot of MATLAB stuff, which I do not understand at all, thus doesn't really help.</p>
  
  <p>Side note: Math is not my strong suit. Which is why I think I'm struggling a bit. Please explain like I'm a 10 year old if possible!</p>