FFTW与OpenCV cvDFT [英] FFTW vs. OpenCV cvDFT

查看:292
本文介绍了FFTW与OpenCV cvDFT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用FFTW(http://www.fftw.org/)而不是OpenCV的cvDFT(http://goo.gl/YCHj0)时,我可以期望提速吗?

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

我的程序的运行时在很大程度上取决于逆向DFT和正向DFT的应用程序,我正在考虑使用FFTW代替OpenCV cvDFT.

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进行某种运行时编译",而cvDFT是一种简单的FFT实现,因此我想它可以加快我的处理速度.

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.

预先感谢

推荐答案

我同时使用了OpenCV和FFTW,您可以期望FFTW比OpenCV中更简单的实现更快(这在很大程度上取决于您的处理器和处理器).图片大小).但是,如果您打算以商业方式使用软件,则FFTW的许可证价格相当昂贵($ 7500.00).在商业情况下,我建议在FFTW上推荐英特尔的IPP ,因为它的性能是与价格便宜得多的许可证($ 199.00)相似,而且与FFTW(即,仅FFT库)相比,IPP具有更多的功能.

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).

此处是FFTW与各种竞争对手库之间的几个基准.结果有点陈旧,但是对于比较很有用.我不确定为什么不包括IPP 2D转换(也许在完成这些基准测试时还不存在).

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).

如果使用IPP路由,则可以构建具有IPP支持的OpenCV,它将用等价的IPP换出本机cvDFT实现.这样可以大大提高性能(尤其是在Intel芯片上),并且您无需更改代码.

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.

这篇关于FFTW与OpenCV cvDFT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆