Sorry this is the first time for me to ask question here, I've given a FFT function
void fft_1d(int n, float xr[256], float xi[256], int ntype)
{
/* compute the FFT of a complex signal
xr and xi are the real and imaginary parts respectively
xr and xi contain the signal as input and the FT as output
n is the number of points, it should be a power of 2
ntype is set to 1 for forward transform and -1 for inverse transform
*/
And I have been told to extend this function to do the 2D (DFT) of the given image.
My problem is:
- I can get every itensity value of the given image but how can I deal with the complex components (real part /imaginary part) of the fft_1d? In other words, what should I put in the parameters
float xr[256]
andfloat xi[256]
in order to do the 2D (DFT) of the image?
Thanks for your attention!