Smoothing is achieved in the frequency domain by dropping out the high frequency components
The basic model for filtering is:
G(u,v) = H(u,v)F(u,v)
where F(u,v) is the Fourier transform of the image being filtered and H(u,v) is the filter transform function
Define Low-Pass Filter in Image Processing
- Low pass filters only pass the low frequencies, drop the high ones.
- 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.
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:
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:
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 3×3 pixels for a total of nine. We could use 5×5 just as easily, or even more.
The only problem with using larger kernels is the number of calculations required becomes very large.
Types of Low-Pass Filter in Image Processing
- Ideal Low Pass Filter
- Butter worth Low pass Filters
- Gaussian Low pass Filters
1. Ideal Low Pass Filter
Simply cut off all high frequency components that are a specified distance D0 from the origin of the transform.
Changing the distance changes the behavior of the filter.
The transfer function for the ideal low pass filter can be given as:
where D(u,v) is given as:
Example of Ideal Low-Pass Filter
2. Butter worth Low pass Filters
The transfer function of a Butter worth low pass filter of order n with cutoff frequency at distance D0 from the origin is defined as:
Example of Butter worth low pass filter
3. Gaussian Low pass Filters
The transfer function of a Gaussian low pass filter is defined as:
Example of Gaussian low pass filter
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.