FFTW vs. OpenCV cvDFT

南楼画角 提交于 2019-12-31 22:37:19

问题


Can I expect a speedup when using FFTW (http://www.fftw.org/) instead of OpenCV's cvDFT (http://goo.gl/YCHj0)?

My program's runtime is heavily determined by the application of inverse and forward DFT and I am thinking about using FFTW instead of OpenCV cvDFT.

IIRC FFTW does some kind of "runtime compilation" whereas cvDFT is a simple FFT implementation, so I guess it could speed up my processing a bit.

So before I am trying it out by myself, I thought to ask in here in case anyone stumbled over the same question and solved it before.

Thanks in advance


回答1:


I have used both (OpenCV and FFTW) and you can expect FFTW to be faster than the simpler implementation in OpenCV (how much depends a lot on your processor and image sizes of course). However, if you plan on using your software commercially FFTW has a rather expensive license ($7500.00). In the commercial case, I would recommend Intel's IPP over FFTW as the performance is similar with a much more affordable license ($199.00) + you get way more functionality in IPP than you do with FFTW (i.e., only an FFT library).

Here are several benchmarks between FFTW and various competitor libraries. The results are kind of old, but are useful for comparison. I'm not sure why the IPP 2D transforms are not included (maybe when these benchmarks were done they didn't exist yet).

If you go the IPP route, you can build OpenCV with IPP support and it will swap out the native cvDFT implementation with the IPP equivalent. This will give you a nice performance boost (particularly on Intel chips), and you don't have to change your code.



来源:https://stackoverflow.com/questions/10436673/fftw-vs-opencv-cvdft

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!