Low-Pass Filtering (Blurring)

The most basic of filtering operations is called "low-pass". A low-pass filter, also called a "blurring" or "smoothing" filter, averages out rapid changes in intensity. The simplest low-pass filter just calculates the average of a pixel and all of its eight immediate neighbors. The result replaces the original value of the pixel. The process is repeated for every pixel in the image.

Before and After Low-Pass Filter

This low-pass filtered image looks a lot blurrier. But why would you want a blurrier image? Often images can be noisy – no matter how good the camera is, it always adds an amount of ”snow” into the image. The statistical nature of light itself also contributes noise into the image.

Noise always changes rapidly from pixel to pixel because each pixel generates its own independent noise. The image from the telescope isn't "uncorrelated" in this fashion because real images are spread over many pixels. So the low-pass filter affects the noise more than it does the image. By suppressing the noise, gradual changes can be seen that were invisible before. Therefore a low-pass filter can sometimes be used to bring out faint details that were smothered by noise.

MaxIm DL allows you to selectively apply a low-pass filter to a certain brightness range in the image. This allows you to selectively smooth the image background, while leaving the bright areas untouched. This is an excellent compromise because the fainter objects in the background are the noisiest, and it does not degrade the sharpness of bright foreground objects.

Filtering can be visualized by drawing a ”convolution kernel”. A kernel is a small grid showing how a pixel's filtered value depends on its neighbors. To perform a low-pass filter by simply averaging adjacent pixels, the following kernel is used:

 

+1/9

+1/9

+1/9

+1/9

+1/9

+1/9

+1/9

+1/9

+1/9

 

When this kernel is applied, each pixel and its eight neighbors are multiplied by 1/9 and added together. The pixel in the middle is replaced by the sum. This is repeated for each pixel in the image.

If we didn't want to filter so harshly, we could change the kernel to reduce the averaging, for example:

 

0

+1/8

0

+1/8

+1/2

+1/8

0

+1/8

0

 

The center pixel contributes half of its value to the result, and each of the four pixels above, below, left, and right of the center contribute 1/8 each. This will have a more subtle effect. By choosing different low-pass filters, we can pick the one that has enough noise smoothing, without blurring the image too much.

We could also make the kernel larger. The examples above were 3x3 pixels for a total of nine. We could use 5x5 just as easily, or even more. The only problem with using larger kernels is the number of calculations required becomes very large.

A variation on this technique is a Gaussian Blur, which simply allows you to define a particular shape of blur kernel with just a single number – the radius of a Gaussian (”normal”) distribution. This provides a very fine control of the amount of blurring; a larger radius produces a stronger effect.