我有问题理解 OpenCV库的方法实际上有效。根据文档,该功能使用基于DFT的算法的“标准”直接版本很明显,但是对于较大的内核大小”(〜11 x 11或更大)。
哪种基于DFT的算法?没有给出科学参考,我无法确定尤其是使用哪种算法。我知道DFT是如何工作的,因此我同时侦察,输入图像和内核被转换为频谱表示,在其中进行了卷积,然后再次返回?如果这是一般的想法,我仍然想要一些其他背景信息。
I have issues comprehending how the filter2D
method of the the OpenCV library actually works. The "standard" direct version for small kernel sizes is clear, but for larger kernel sizes "(~11 x 11 or larger) the function uses the DFT-based algorithm", according to the documentation.
Which DFT-based algorithm? There is no scientific reference given and I wasn't able to determine which algorithm is used in particular. I am aware of how a DFT works, so I recon both, input image and kernel are transformed into a spectral representation where the convolution is conducted and then back again? If this is the general idea I would still like some additional background information.
发布评论
评论(1)
用于使用DFT处理卷积的技术通常称为“ “。当内核很大时,这是合适的,但仍然比您应用于的信号/图像小得多。
在2D中,给定MXM内核(通常为M将被舍入到2的功率):
该技术很长一段时间以来在信号处理字段中已知,而且我没有提及其来源。还有一种变体被称为“ reberlaplap-save ”。
Google搜索“ 2D重叠添加卷积”产生了令人满意的结果。
The technique used to process convolutions using the DFT is generally known as "overlap-add". It is appropriate when the kernel is large, but still quite a bit smaller than the signal/image that you're applying it to.
In 2D, given an MxM kernel (and usually M would be rounded up to a power of 2):
This technique has been generally known in the signal processing field for a long time, and I don't have a reference to its origin. There's also a variation known as "overlap-save".
A google search for "2d overlap add convolution" yields somewhat satisfying results.