Gaussian filtering and high-pass filtering

The image is in the frequency domain, 频率低的地方说明它是比较平滑的,因为平滑的地方灰度值变化比较小, and频率高的地方通常是边缘或者噪声,因为这些地方往往是灰度值突变的

The so-called 高通滤波is to retain the part with a relatively high frequency, that is, to highlight the edge; 低通滤波it is to retain the place with a relatively low frequency, that is, to smooth the image, weaken the edge, and eliminate noise


Gaussian filtering :
Under the concept of image processing, Gaussian filtering links image frequency domain processing and time domain processing,Used as a low pass filter, which can filter out low-frequency energy (such as noise) to smooth the image.

Gaussian filtering is a linear smoothing filter, which is suitable for eliminating Gaussian noise and is widely used in the noise reduction process of image processing. In layman's terms,Gaussian filtering is the process of weighted averaging of the entire image, the value of each pixel is obtained by the weighted average of itself and other pixel values ​​in the neighborhood. The specific operation of Gaussian filtering is: use a template (or convolution, mask) to scan each pixel in the image, and use the weighted average gray value of the pixels in the neighborhood determined by the template to replace the value of the pixel in the center of the template. Gaussian smoothing filters are very effective at suppressing noise that follows a normal distribution.

Gaussian Blur :

The Gaussian blur we often say is done using a Gaussian filter. Gaussian blur is a kind of low-pass filter, that is, the filter function is a low-pass Gaussian function, but Gaussian filter refers to using a Gaussian function as a filter function. As for whether it is blur , depends on whether it is Gaussian low pass or Gaussian high pass, low pass is blurring, high pass is sharpening.


Convolution is a simple definition, which has no meaning in itself, but its application in various fields is very extensive. In filtering, it can be understood as a weighted average process. The value of each pixel is determined by itself and The other pixel values ​​in the neighborhood are obtained after weighted average, and how to weight is based on the kernel function Gaussian function .

Averaging process:

For images, smoothing and blurring is to use the average value of surrounding pixels.

The "middle point" takes the average value of the "surrounding points", and it will become 1. Numerically, this is a kind of "smoothing". In terms of graphics, it is equivalent to producing a "blur" effect, and the "middle point" loses details.

Obviously, when calculating the average value, the larger the value range, the stronger the "blur effect" .

If simple averaging is used, it is obviously not very reasonable, because the images are continuous, the closer the points are, the closer the relationship is, and the farther away the points are, the more distant the relationship is. Therefore, the weighted average is more reasonable, the closer the point is, the larger the weight is, and the farther the point is, the smaller the weight is .

The normal distribution is obviously a desirable weight distribution mode. Since the image is two-dimensional, a two-dimensional Gaussian function needs to be used:

When calculating the average value, we only need to use the "central point" as the origin, and assign weights to other points according to their positions on the normal curve to obtain a weighted average value, which is the above-mentioned two-dimensional Gaussian kernel The process of convolution .

Gaussian filtering_MingChaoSun's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/qq_38758371/article/details/132010454