DSP – Filtering in the frequency domain via FFT

There are two issues: the way you use the FFT, and the particular filter. Filtering is traditionally implemented as convolution in the time domain. You’re right that multiplying the spectra of the input and filter signals is equivalent. However, when you use the Discrete Fourier Transform (DFT) (implemented with a Fast Fourier Transform algorithm for … Read more

Inverse fourier transformation in OpenCV

Actually, you don’t have to swap the different quadrants, it’s needed only if you’re a human and want a more natural looking visualization of the FFT result (i.e. with the 0 frequency in the middle, negative frequencies left/bottom and positive frequencies up/right). To invert the FFT, you need to pass the result of the forward … Read more