In the time domain I have an image matrix ($256x256$) and a gaussian blur kernel ($5x5$). I've used FFT within Matlab to convert both the image and kernel to the frequency domain as zero padded $260x260$ matrices ($N + M -1 = 256 + 5 -1 = 260$)
I then multiply the image matrix by the kernel and use IFFT to convert the result back to the time domain. When I try to display the result, it is just junk and doesn't resemble the original image with a gaussian blur like it should.
Here is the Matlab code I am using, where image = $256x256$ and kernel = $5x5$:
imagefreqdomain = fft2(image,260,260) kernfreqdomain = fft2(kernel,260,260) filtimagefreqdomain = imagefreqdomain * kernfreqdomain filtimage = ifft2(filtimagefreqdomain)
What am I doing wrong? Thanks