Element-wise multiplication results between 2D arrays in KISSFFT are different than SciPy FFT

前端 未结 1 422
悲&欢浪女
悲&欢浪女 2020-12-21 23:08

I\'m experimenting with KISSFFT in C++ after being discouraged to use FFTPACK to process 2D arrays.

I wrote an element-wise multiplication

相关标签:
1条回答
  • 2020-12-21 23:46

    The problem was the order in which width and height were used in shape. This variable is later passed to kiss_fftnd_alloc() as an argument and height must be defined first:

    const int numDim = 2;
    int shape[numDim] = { height, width };
    

    After making this change inside fft2d() and ifft2d() the application displayed the correct results.

    0 讨论(0)
提交回复
热议问题