Firstly this is not a homework question. I am working on a project and my professor gave me this task so I can also learn about filters and fourier domain.
I have a picture that is 2800 x 4500 pixels. I need to make a filter that will only give an arbitrary number of "frequencies".
My thought process is this:
1. Transfer the picture in fourier domain using
F = fftshift(fft2(img));
2: Multiply it by a filter that has ones around the centre and zeroes elsewhere.
3: Transfer the image back into x-y domain
The problem is that I don't know how to make the filter since the picture is non-square. I tried making a circle but that didn't work. How do I make an ellipse shape?
In 1-d it is easy because the filter is a vector with ones around the centre.
I tried looking for answer to this but the pictures in question are always square pictures so I cannot apply the same thing. Also nowhere does it say how it works but rather it is just done.