I used both (OpenCV and FFTW), and you can expect FFTW to be faster than a simpler implementation in OpenCV (how much it depends on your processor and image size, of course). However, if you plan to use your software commercially, FFTW has a rather expensive license ($ 7,500.00). In the commercial case, I would recommend Intel IPP via FFTW, since the performance is similar to a much more affordable license ($ 199.00) + you get a way more functionality in IPP than in FFTW (i.e. only in the FFT library) .
Here are a few tests between FFTW and various competitor libraries. The results are old, but useful for comparison. I'm not sure why IPP 2D transforms are not included (maybe when these benchmarks were met, they didn't exist yet).
If you go the IPP route, you can create OpenCV with IPP support, and it will replace its own cvDFT
implementation cvDFT
IPP equivalent. This will give you a good performance boost (especially on Intel chips), and you wonβt have to change your code.
source share