FFT-based convolution

Discrete convolution using FFT method

10.6K descargas

Actualizado 14 Jun 2021

Ver licencia

As opposed to Matlab CONV, CONV2, and CONVN implemented as straight forward sliding sums, CONVNFFT uses Fourier transform (FT) convolution theorem, i.e. FT of the convolution is equal to the product of the FTs of the input functions.
In 1-D, the complexity is O((na+nb)*log(na+nb)), where na/nb are respectively the lengths of A and B.
Optional arguments to control the dimension(s) along which convolution is carried out.
Slightly less accurate than sliding sum convolution.
Good usage recommendation:
In 1D, this function is faster than CONV for nA, nB > 1000.
In 2D, this function is faster than CONV2 for nA, nB > 20.
In 3D, this function is faster than CONVN for nA, nB > 5.

Citar como

Bruno Luong (2023). FFT-based convolution (https://www.mathworks.com/matlabcentral/fileexchange/24504-fft-based-convolution), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2009a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Inspiración para: BiofilmQ, conv2fft_reuse, Matching pursuit for 1D signals

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión

Fix bug when calling with syntax CONV2FFT(H1, H2, A, SHAPE)

Installation script use now right mex compilation options for R2018a or later

Make inplaceprod compatible with interleaved complex

Add the syntax conv2fft(H1, H2, A, ...)

Option allows to disable padding to next power-two. Mex implement inplace product that saves about 1/3 memory. These two enhancement might be useful when perform convolution with very large arrays.

GPU unable by default + changes in help section

GPU/Jacket capable

correct bug when ndims(A)<ndims(B)