Concept

Implementation of the FFT on the convolution

The Convolution theorem states that convolution of two signals is the pointwise multiplication of their Fourier transforms. So if we take an inverse of the product of two Fourier transforms we can get the convolution of two signals. So here is how it can be done in python:

fft_result = np.fft.fft2(image, target_dim) * np.fft.fft2(feature, target_dim) target = np.fft.ifft2(fft_result).real

And this way works a lot faster than usual implementation of the convolution

0

1

Updated 2020-09-26

Tags

Data Science