"Image processing Notes" smoothing spatial filter

Source: Internet
Author: User

The Smoothing spatial filter is a low-frequency enhanced spatial filtering technique. It has two kinds of purposes: one is fuzzy processing, the other is to reduce noise. The Smoothing space filter introduced in this paper is divided into two types, one is linear filter, such as the simplest simple average method, and the other is statistical sorting filter.


Let's talk about smoothing linear filters first.

The output (response) of a smoothed linear spatial filter is a simple average of pixels contained within the neighborhood of the filter template. These filters are sometimes referred to as mean filters. They can also be classified into low-pass filters.

The result of this processing reduces the sharp change of image grayscale. Because typical random noises are made up of drastic changes in the gray scale, the common application of smoothing is noise reduction.

However, due to the image edge (almost always an image of the desired characteristics) is also caused by the sharp changes in image gray characteristics, so the mean filter processing or there is undesirable edge blur negative effects.

The following image is the most common simple average filter template

The spatial mean filter, which is equal to all coefficients, is sometimes referred to as a box-like filter.

This filter template is more important than the previous one. This filter template produces so-called weighted averages, using the term refers to multiplying pixels by different coefficients. That is, the importance (weight) of some pixels is greater than that of some other pixels.

In the template shown in this example, the coefficient of the center position is the largest, so the pixel can be given a greater weight in the mean calculation. The closer the other pixels are to the center, the greater the weight is given.

The purpose of this weighted weight strategy is to try to reduce the blur in the smoothing process.

We can also choose other weights to achieve the same goal.

However, the sum of all the coefficients in this example is equal to 16, which is a very attractive feature for a computer, because it is a power of 2 for the whole number of times.


In practice, it is often difficult to see the difference between the two templates or a similar way of smoothing the image because the templates span a small area across any one of the images.


An image of M * N is passed through a m*n weighted mean filter, the process of filtering can be given by the following formula:

When the details of the image are similar to the filter template, some of the details in the image are affected more greatly.

The larger the neighborhood, the better the smoothing effect. But the neighborhood is too large, smoothing will make the edge information loss, so that the output of the image becomes blurred, so it is necessary to choose a reasonable neighborhood size.

The size of the template is determined by the size of the object r that will be incorporated into the background.

There may be black edges in the filtered image. This is because we fill the boundary of the original image with 0 (black), after filtering, then remove the result of the filled area, some black mixed with the filtered image. This is a problem for images that are smoothed with larger filters.


Statistical sort (Nonlinear) filter

The statistical sort filter is a nonlinear spatial filter in which the response is based on the sorting of the pixels of the image surrounded by the filter, and then the value of the central pixel is substituted by the value determined by the statistical sorting result.

The most well-known in this category is the median filter ~ it is the value of the pixel in place of the median value of the gray value in the pixel neighborhood.

The use of median filters is very common, and it provides an excellent denoising capability for a certain type of random noise. And the fuzzy degree of the linear smoothing filter is obviously lower than that of the same size.

The median filter is very effective in dealing with impulse noise, which is called salt and pepper noise because the noise is superimposed on the image in the form of black and white dots.

The main function of the median filter is to make points with different shades of gray appear closer to their neighbors.

We use the M*m median filter to remove isolated pixel families that are brighter or darker than their neighborhood pixels and whose region is less than (m^2)/2 (half of the filter area).










Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"Image processing Notes" smoothing spatial filter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.