# What happens at the edges in fft2 filtering?

I am doing a fairly simple homework assignment in MATLAB that is to filter an image in the frequency domain. So my code looks something like this:

output = ifft2(fft2(image, x, y).*fft2(filter, x, y));


After testing some images, this code filters properly, but has weird edge behavior. Out of curiosity, what exactly happens at the edges using this method? (0, symmetric, replicate, circular)?

• Please add the homework tag, and try adding an image illustrating the weird behavior in your result. – Gilles Sep 30 '15 at 9:27