Circular/Linear Convolution 与 DFT

今天在一篇论文中看到这样一句话:
FFT-based deconvolution hinges on a blur model which assumes a convolution with periodic (circular) boundary conditions.

Matlab 文档中详细说明了二者的区别:
Linear and Circular Convolution
通常我们所学的是Linear Convolution,但是它的计算比较复杂,而我们所说的简化方法:“时域上的卷积 等价于 频域上(傅里叶域)的点积” 只适用于 Circular Convolution,对 于Linear Convolution 需要加上额外的Padding操作才能等价。原话是这样:

1、For two vectors, x and y, the circular convolution is equal to the inverse discrete Fourier transform (DFT) of the product of the vectors’ DFTs.


2、Knowing the conditions under which linear and circular convolution are equivalent allows you to use the DFT to efficiently compute linear convolutions.
具体二者等价的条件是:For the circular convolution of x and y to be equivalent, you must pad the vectors with zeros to length at least N + L - 1 before you take the DFT. After you invert the product of the DFTs, retain only the first N + L - 1 elements.

Linear Convolution 和 Cicular Convolution的具体操作图示如下:
这里写图片描述
如何pad x 和 y,才能让利用DFT快速计算 Linear Convolution?如下图所示:
这里写图片描述

下面看一组测试:

 x = [5 6 8 2 5]; 
 y = [6 -1 3 5 1];
 N = length(x) + length(y) -1;
 x1 = [x zeros(1,N-length(x))];
 y1 = [y zeros(1,N-length(y))];
 c1 = ifft(fft(x1).*fft(y1));  % Circular Convolution
 c2 = conv(x,y,'full');        % Linear Convolution = c2 due to the padding

 c3 = ifft(fft(x).*fft(y));    % Without padding, not equivalent to c2
 c4 = cconv(x,y, length(x));    % Circular Convolution, equal to c3

x1 =

     5     6     8     2     5     0     0     0     0
y1 =

     6    -1     3     5     1     0     0     0     0
c1 =

    30    31    57    47    87    47    33    27     5     
c2 =

    30    31    57    47    87    47    33    27     5 
c3 =

    77    64    84    52    87  
c4 =

    77    64    84    52    87

参考:
【1】2D circular convolution Vs convolution FFT [Matlab/Octave/Python]
【2】Linear and Circular Convolution

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值