1

我正在使用 FFTW 库计算像素为双倍的图像的 fft,为此我使用 Visual Studio 2008 中的库 fftw(http://www.fftw.org/) 库并使用 ITK (http:/ /www.itk.org/)。

当我从双指针计算 fft 时,使用方法 'fftw_plan_dft_c2r_2d' 进行计算但引入了不准确性,大约为 +- 0.5...</p>

我真的不知道出了什么问题,也许是像素之间的间距?使用的数据类型?以前有人遇到过这个问题或类似的问题吗?

非常感谢。

安东尼奥

代码:

代码在这里:

// FFT CALCULATION
    // Inizialization of the neccesary elemnets for calculating the FFT. 
    fftw_plan p1;  //variable for storing the FFT 
    int N_fft= ancho*alto;  //number of points of the image
    fftw_complex *F1 =(fftw_complex*) fftw_malloc(sizeof(fftw_complex)*alto*((ancho/2)+1));  // result pointer
    p1 = fftw_plan_dft_r2c_2d(alto,ancho, f1, F1, FFTW_ESTIMATE);  // FFT planning
    fftw_execute(p1);  // FFT calculation
    fftw_destroy_plan(p1); // plan is destroyed 

我想对名为 f1 的双指针进行 FFT。

4

0 回答 0