简体   繁体   中英

IFFT from FFT in AForge.Net

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)

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;
                    }
                }
            }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM