multidimensional FFT with fftw3
Closed this issue · 2 comments
Hello,
it is not an issue, rather misunderstanding on how to use fftw3.
I am trying to perform a 2d FFT on a grayscale image, which doesn't has dimensions 2^N \times 2^n, but rather 2^N 3^M 5^L \times 2^n 3^m 5^l. Therefore, I am trying to use fftw3, by using "#define cimg_use_fftw3". I call function get_fft(CImg ...), but I get exception that dimension is not equal 2^N along some axis.
Is it an indicator that I made "#define cimg_use_ffw3" in some wrong place (I have several instances of CImg.h include)?
Is it an indicator that I made "#define cimg_use_ffw3" in some wrong place (I have several instances of CImg.h include)?
That's probably the case yes. It should be put before each #include "CImg.h" when possible, or better, defined directly when compiling (with g++, as the option -Dcimg_use_fftw3
).
Thanks for the prompt reply! Adding the compiler options seems neater and works.