与 FFT 进行卷积,这是如何工作的?
我知道在时域中卷积是两个矩阵之间相当昂贵的运算,您可以通过在复平面中变换它们并使用乘法(然后返回时域)在频域中执行它
无论如何我不明白这是怎么回事在CUDA SDK中执行,数据和内核被填充并放入两个缓冲区(m_PlatedKernel和m_PlatedData),这应该是为了加速Cooley-Tuckey方法,然后调用函数cufftExecC2C首先转换Kernel(以及为什么C2C ?复数到复数,为什么不是实数到复数?)进入复平面,然后将整个数据放入同一平面然后
定义的内核 spProcess2D_kernel 开始工作,看起来像标准化并执行数据和内核之间的乘法频域(如何进行两个函数的乘法?我认为它们的意思是组合两个函数)并返回 C2C 变换(仍然想知道为什么是 C2C 而不是 C2R)
I know that in time domain convolution is a pretty expensive operation between two matrices and you can perform it in frequency domain by transforming them in the complex plane and use multiplication (and then back in the time domain)
Anyway I don't understand how this is performed in the CUDA SDK where the data and the kernel are padded and put into two buffers (m_PaddedKernel and m_PaddedData), this should be to accelerate Cooley-Tuckey method, then the function cufftExecC2C is called to transform first the Kernel (and why C2C? complex-to-complex, why not real-to-complex?) into the complex plane and then the entire data into the same plane
The defined kernel spProcess2D_kernel then kicks in and seems like normalize and executes the multiplication between data and kernel in the frequency domain (how to do the multiplication of two functions? I think they mean composing the two functions) and back with the C2C transformation (still wondering why C2C and not C2R)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至于为什么可以用FFT来完成这个,你需要阅读卷积定理。
一般来说,您的输入数据可能很复杂。这就是为什么使用C2C。
As to why this can be done with the FFT, you need to read about the convolution theorem.
In general, your input data may be complex. So that is why C2C is used.