Why are smoothing spatial filters used
However, it is reasonable to assume that occasional noises do not change the local continuity of an image. Take the image below for example, there are two dark points in the bright area. The two noises are replaced with the average of their surrounding points. The process of reducing the influence of noise is called smoothing or blurring. The average smoothing treats the same to all the pixels in the neighborhood. In order to reduce the blur in the smoothing process and obtain a more natural smoothing effect, it is natural to think to increase the weight of the template center point and reduce the weight of distant points.
So that the new center point intensity is closer to its nearest neighbors. The Gaussian template is based on such consideration. The average template blurs the image while eliminating the noise. A more desirable way is selective smoothing, that is, smoothing only in the noise area, and not smoothing in the noise-free area.
This way potentially minimizes the influence of the blur. It is called adaptive filtering. So how to determine if the local area needs to be smoothed with noise?
The answer lies in the nature of the noise, that is, the local continuity. The presence of noise causes a grayscale jump at the noise point, thus making a large grayscale span. Therefore, one of the following two can be used as the criterion:. There are some other approaches to tackle the smoothing, such as median filter and adaptive median filter. Image sharpening filters highlight edges by removing blur. It enhances the grayscale transition of an image, which is the opposite of image smoothing.
The arithmetic operators of smoothing and sharpening also testifies the fact. While linear smoothing is based on the weighted summation or integral operation on the neighborhood, the sharpening is based on the derivative gradient or finite difference. How to distinguish noises and edges still matters in sharpening.
The difference is that, in smoothing we try to smooth noise and ignore edges and in sharpening we try to enhance edges and ignore noise. There are a couple of filters that can be used for sharpening. In this article, we will introduce one of the most popular filters — Laplace operator, which is based on second order differential. Linear Spatial Filter 2.
Blurring is pre-processing steps for removal of small details and Noise Reduction is accomplished by blurring. Types of Smoothing Spatial Filter:. These are explained as following below.
Mean Filter: Linear spatial filter is simply the average of the pixels contained in the neighborhood of the filter mask. The idea is replacing the value of every pixel in an image by the average of the grey levels in the neighborhood define by the filter mask.
Types of Mean filter: i Averaging filter: It is used in reduction of the detail in image. All coefficients are equal. Center pixel is multiplied by a higher value than average filter. Skip to content. We can see the filtered image right has been blurred a little bit compared to the original input left.
As mentioned earlier, the low pass filter can be used denoising. Let's test it. First, to make the input a little bit dirty, we spray some pepper and salt on the image, and then apply the mean filter:. Much better. Unlike the previous filter which is just using mean value, this time we used median.
Median filtering is a nonlinear operation often used in image processing to reduce "salt and pepper" noise. Matlab provides a method to create a predefined 2-D filter.
0コメント