1

我正确地获得了图像的 2d-fft,但没有从同一图像的 2d-fft 中得到相反的结果。
从同一张图像的 2d-fft 得到逆的正确要求是什么???

// for 2d-fft. This I am getting properly
kiss_fftnd_cfg st = kiss_fftnd_alloc(dims, ndims, 0, 0, 0);
kiss_fftnd(st,(kiss_fft_cpx *)fftbuf,(kiss_fft_cpx *)fftoutbuf);

// for inverse. By using this I am getting the wrong values.
kiss_fftndr_cfg st2 = kiss_fftndr_alloc(dims, ndims, 1, 0, 0);
kiss_fftndri(st2, (kiss_fft_cpx *)fftoutbuf, (kiss_fft_scalar *)obuf);

// even I have tried this. By using this I am getting the wrong values.
kiss_fftr_cfg st3 = kiss_fftr_alloc( (rows * cols) , 1, 0, 0);
kiss_fftri( st3 , (kiss_fft_cpx *)fftoutbuf ,(kiss_fft_scalar *)rbuf);
4

1 回答 1

1

您正在混合复杂和真实的 FFT。

正向/反向行为由inverse_fft*alloc 函数的第三个参数控制(即 complexkiss_fftnd_alloc和 real kiss_fftndr_alloc)。

于 2018-10-13T11:45:04.827 回答