0
votes

I'm rewriting code from Matlab to C#. I'm completely newb at mathematics. I had to use FFT function which I found in AForge.net library, but now I need IFFT. Is this possible to use FFT to compute IFFT in few lines?

Aforge.Net FFT declaration:

 public static void FFT (Complex[] data, Direction direction)
1
FFTW is too hard, because it is in C++. Also fttw wrapper for net doesnt work in new visual studio (cannot convert).apocalypse
Sorry to hear that. I found a wrapper for fftw that rocks, and I used it in my project. I hope you have seen this: sdss.jhu.edu/~tamas/bytes/fftwcsharp.htmlDaniel Mošmondor
How to use it? I cannot load that solution into VS2010.apocalypse

1 Answers

1
votes

Inverse transform of an image, from ComplexImage.cs.

         FourierTransform.FFT2( data, FourierTransform.Direction.Backward );
            fourierTransformed = false;

            for ( int y = 0; y < height; y++ )
            {
                for ( int x = 0; x < width; x++ )
                {
                    if ( ( ( x + y ) & 0x1 ) != 0 )
                    {
                        data[y, x].Re *= -1;
                        data[y, x].Im *= -1;
                    }
                }
            }