Recently, I have worked on Image Processing and dealt with several filters. Here is a summary. Filter is a concept of signal processing, but the theory of signal processing is widely used. I mainly use it in image processing. This articleArticleI mainly talk about the functions of filters and how to use them in MATLAB. As for the principles, I do not quite understand them...
Images are often contaminated by random intensity signals. Some common noises include salt & pepper noise, impulsive noise, and Gaussian noise. Salt and pepper noise contains random black and white intensity values, while pulse noise only contains random white intensity values (Positive pulse noise) or black intensity values (negative pulse noise ). Unlike the first two, Gaussian noise contains noise whose intensity is subject to Gaussian or normal distribution.
(1) Gaussian low-pass filter
Gaussian filter is a filter that returns a pulse to a Gaussian shape. For an image, Gaussian filter uses a two-dimensional convolution operator of the Gaussian KernelBlur Images (smooth,Remove details and noise). In Matlab, W = fspecial ('gaussian ', [5 5], 0.8) can be used to generate a Gaussian Kernel. In this function, the second parameter is the window size, the standard deviation in the third Parameter Gaussian function. The following figure shows the Gaussian window and its two-dimensional distribution:
It can be seen that it is a Gaussian function. The filtering result of this filter is that the value of each pixel changes to the weighted sum of the neighboring pixels in the window. If you look at the grayscale histogram, it is obvious that the histogram will become smoother. Filtering with this filter is also very simple in MATLAB: g = imfilter (F, W );
(2) Mean Filter
The mean filter is also very simple, that is, the pixel value is replaced by the average value of the neighbor in the window. W = fspecial ('average', 5 ).It is mainly used for smoothing noise, but compared with the Gaussian filter above, the smoothing method is obviously more crude. The value of the neighboring area is equal regardless of distance, and the Gaussian filter is at least distinguished by distance.
(3) Median Filter
The median filter replaces the pixel value with the median value in the window. It is also used to reduce noise, especially for salt and pepper noise. The implementation of the median filter in MATLAB is somewhat different from the above two. Its usage is
G = medfilt2 (F, [r c]).
(4) Vina Filter
Compared with the above four filters, the Gini filter is more complex. It is often used in restoration signals. Therefore, it is also one of the methods for image noise reduction. It is the same as Gaussian noise and mean noise, it can achieve a smooth effect, and the effect will be better, because it can estimate the value of this pixel. The filter principle is complex. If you do not describe it, find the relevant information and try again.
Maltab has implemented this filter: g = wiener2 (F, [r c]).