# When lowpass filtering with a Gaussian kernel, how can $\sigma$ be related to cycles/pixel?

I wish to low pass filter an image with a Gaussian kernel. However, I also wish to select a filter that has the property of producing images that have have no greater than N cycles/pixel. Let's say I wish N to be close to, or exactly .025.

By what method is $\sigma$ selected in order to obtain such an image?

## 2 Answers

The frequency response of a Gaussian is also a Gaussian, see here. The cutoff frequency $\sigma_f$ is defined as the standard deviation of the frequency response. This is given by $$\sigma_f = \frac{1}{2\pi\sigma}$$ Given that $N$ is the wavelength of the frequency components you wish to remove, you can calculate the corresponding frequency and work out how much you want to reduce it by, work out the corresponding cut-off frequency and filter standard deviation.

A more back of the envelope approach is to say that Gaussians of standard deviation, $\sigma$, remove or strongly reduce components with lateral size $<\sigma$.

You have to be more specific about what you want from the filter. No practical lowpass filter will remove all of the energy in the low frequencies. Filter design involves a tradeoff between how well you want to eliminate the undesired frequencies and the size of your filter among other things.

• Does what you say imply that there is no direct connection between the choice of sigma and the maximum number of cycles / pixel in the filtered image? – skleene May 2 '14 at 14:32
• What is meant is that while the Gaussian filter attenuates higher frequencies (cycles/pixel), none of the higher frequencies gets attenuated all the way to zero. So all frequencies will be present to some degree, and there is no maximum. If you instead redefine your maximum to be the frequency above which everything that is attenuated by more than 1/2, then you can relate sigma to that. – geometrikal May 3 '14 at 22:32