I have a current implementation of Gaussian Blur using regular convolution. It is effective enough for small cores, but as soon as the size of the cores becomes a little large, performance becomes a hit. So I'm going to implement convolution using FFT. I have never had any experience with FFT-related image processing, so I have a few questions.
Is 2D FFT convolution also split into two one-dimensional convolutions?
Now I understand that the kernel size should be the same size as the image (line in case of 1D). But how will this affect the edges? Do I need to fill the edges of the image with zeros? If so, should the kernel size be equal to the size of the image before or after filling?
In addition, this is a C ++ project, and I plan to use kissFFT as it is a commercial project. You can offer any best alternatives. Thank.
EDIT: Thanks for the answers, but I have a few more questions.
I see that the imaginary part of the input image will be all zeros. But will the imaginary part output also be zeros? Should I multiply the Gaussian core by the real and imaginary parts?
, .. . , ?
, , , . , ? .
512x512, . ?
.
, , , , . kissfft, FFT - kiss_fftnd kissfft. .
kiss_fftnd
. , . , , , , .
, (, M x N):
, 1-3 .
. , , . , , , (. "" )? , . , , , , .
, - , . , . FFT, , . , ( ) .
, FFT, - . .
. , . Decibel 20*log10(abs(x)), 10*log10(x*x'), . (x - fft-, x' - x).
20*log10(abs(x))
10*log10(x*x')
x
x'
. , .
, . , , , (), , - IFFT . , .
, , , . - periodicity. , DFT ( FFT, ) , , - , N x M - (1, ) (N, m) m < M. . , , . , . FFT, . . - .
- , . , ( ). , , ( , ), , IFFT. .
, .