Why would we want to go through the frequency domain when we could just get the same result using the filter kernel? Isn't going through the frequency domain more steps?
mpotoole
@adigrao2012 It might be more steps, but frequency domain filtering can be the faster approach.
The cost for a 2D convolution with a (non-separable) filter is N^2 M^2 according to this slide, where your image is N x N and your filter is M x M. The cost of doing a 2D convolution can become pretty large when M is large. For example, consider the case where M=N, where the cost of a 2D convolution is N^4 operations.
One of the advantages of frequency domain filtering in this case is that it is much faster. The most expensive step here is the fast Fourier transform itself, which requires N^2 log N operations.
So even though frequency domain filtering takes more steps, it can be the faster solution.
Why would we want to go through the frequency domain when we could just get the same result using the filter kernel? Isn't going through the frequency domain more steps?
@adigrao2012 It might be more steps, but frequency domain filtering can be the faster approach.
The cost for a 2D convolution with a (non-separable) filter is N^2 M^2 according to this slide, where your image is N x N and your filter is M x M. The cost of doing a 2D convolution can become pretty large when M is large. For example, consider the case where M=N, where the cost of a 2D convolution is N^4 operations.
One of the advantages of frequency domain filtering in this case is that it is much faster. The most expensive step here is the fast Fourier transform itself, which requires N^2 log N operations.
So even though frequency domain filtering takes more steps, it can be the faster solution.