Let's say I have an image that is 512 x 512 pixels. I've been tasked with creating two ideal half-band low-pass filters that will filter the image. The first filter is 8 x 8, and the second one is 16 x 16.
Each filter will represent the same frequency range (0 to Nyquist) and possess the same shape (half-band ideal filter). The bigger filter will feature better frequency resolution resulting in improved roll-off at the cut-off frequency.
However, let's say I wanted to do the filtering in the Fourier domain. How would multiplication work if the filters and images are different sizes?
It seems like the answer is to increase the size of the filter. Two options come to mind:
- Zero pad the filter's fourier domain. However, this would result in shifting the cut-off frequency such that is no longer a half-band filter.
- Interpolate the filter fourier domain. Essentially stretch out the pass-region by adding more "ones" to alter the frequency resolution. However, this would seem to alter the roll-off of the filter. Essentially the 8x8 and 16x16 filters would become the same.
So how exactly should multiplication occur if the filters don't match the input size? It seems like there are flaws in both zero padding and interpolation.