I have a small 2D Gaussian image filter that I am currently applying as a window by convolution. I would like to do this in the Fourier domain as a single multiplication. I would like to convert my current small filter to the Fourier domain as it is with maximum possible fidelity.
I do not know the size of the image that I shall be applying it on and want to be able to dynamically change it for any image size. How do I go about doing this?
Can I scale my filter to the image size (square to rectangle), FFT the scaled and now distorted and multiply in the Fourier domain?
or
Should I FFT it first, scale up (square to rectangle) and distort the FFT and then multiply it?
I am not convinced that either is a correct approach. Are there any alternative ways?
I am working with this in MATLAB