Smoothing filters are used to reduce noise, remove small details and texture, and produce a blurred version of the image. They act as low-pass filters because they keep slow/smooth changes.

Constant Averaging Filter

An average (mean) filter is the simplest smoothing filter:

So each new pixel in the filtered image is the average of the 9 pixels in its neighborhood in the original image.

Gaussian Averaging Filter

Instead of averaging all neighbors equally, we weight neighbors based on distance from the center pixel:

Pixels closer to the center get more weight.

For example, for a filter with , we would have

where all the coefficients are rescaled to sum to 1, which preserves brightness. Furthermore, all numbers are powers of 2, which makes it very efficient to compute.

Increasing the causes a stronger blur.