Here we have a moving average of side 11 pixels and

we can see that the effect is to blur the original image.

If we push the dimension to 51 points the blurring becomes very severe.

You can see here around the image the effect of the border

that I mentioned before in the context of IRR filtering.

This is the width of the impulse response and we see this discontinuity

because after 51 points, the zeroes that we assumed to be outside of

the original image no longer influence the output of the moving average filter.

Another popular low pass filter for images is the Gaussian blur.

In the Gaussian blur, we take a impulse response,

which is a two dimensional Gaussian function.

A cross section of this impulse response if we were to plot it

would look like this, the typical Gaussian characteristic.

So this filter computes a moving average, where the pixels

away from the center of the filter are weighed by a Gaussian characteristic.

Now the Gaussian function, whether one or

two dimensional, is not a finite support function.

So we arbitrarily truncate it and

set the input's response to 0 after N- 1 samples, where

N is approximately 3 times the standard deviation of the Gaussian characteristic.

If we were to plot the input's response in Cartesian format, it would look like this.

We could also plot it as an image, and here you can see that

we're weighing more the points that are close to the center of the filter and

weighing less the points that are close to the corners.

The Gaussian impulse response has a perfect circle of symmetry and so

it is separable.

You can implement it as horizontal Gaussian filtering followed by

a vertical Gaussian filtering in one dimension.

The result is that we're less sensitive to border effects.

By appropriately choosing the standard deviation and

the support of the filter, we can achieve arbitrary smoothing power.

Here, for instance, we have a Gaussian filter with a standard deviation of 1.8,

so we choose N in this case to be approximately three times this,

which is that to be around 5.

And so we have an 11 by 11 square filter.

Here, the standard deviation is 8.7 and

we choose N to be 25 in order to get a 51 x 51 blurring filter.

Now you can see that because of the smoothing characteristic of the Gaussian

impulse response, we're less affected by border effects.

There is still a darker halo around the border of the image but

it's less pronounced, because as we moved inwards,

the zeros outside of the image are weighed down by the Gaussian characteristic.