Image Processing——Gaussian filter and Bilateral filter

电子科技大学 格拉斯哥学院
2017级明昕玥

Gaussian Filter

Gaussian Filter is a linear filter,which is used to smooth the whole image or simpler ‘dim’(we can consider it as every value of a pixel is determined by the surrouding pixel which we use a respectively average value to replace the origin one——But this point will lose some details)
The larger fuzzy radius is, the better result we can obtain; However, it is not correct for us to have the average value to replace. Instead,we have to ensure the weights of every surrounding value of pixel. (Generally, the closer distance, the larger weights due to the closely relationship. vise versa)——>weight matrix

1-D Gausian Function

Image Processing——Gaussian filter and Bilateral filterCorresponding FigureImage Processing——Gaussian filter and Bilateral filter

2-D Gaussian Function

Image Processing——Gaussian filter and Bilateral filterImage Below
Image Processing——Gaussian filter and Bilateral filter

The separation property of Gaussian Function

2-D Gaussian function is the basis construction of the Gaussian Filter. We can easily obtain that,the distribution of G(x,y) on x-axis and y-axis is a convex-shped hat. In this case, sigma can be considered as 2 values; One is sigmaX,another is sigmaY
We can seperately deal with the 2-D Gaussian Function by using its property,G(x,y)=G(x)*G(y)Image Processing——Gaussian filter and Bilateral filter

Smoothing

Image Processing——Gaussian filter and Bilateral filterWhen sigma(Variance)incrases,the convex decreases,and the whole function becomes smoother,the effect on the figure is more obvious.
Image Processing——Gaussian filter and Bilateral filter
Truncation which is the fuzzy radius above,we won’t take those points beyond the radius into account.

Bilateral Filter

Bilateral Filter is kind of non-linear filter,it is combined by two Gaussian functions,this function can smooth the image and keep the margin at the same time.(One is afore-mentioned one, which determins the weights according to the distance,another is to calculate the weights by comparing the value of the pixel,if there is a big difference we will save it as a margin)

Formula of Bilateral Filter

Image Processing——Gaussian filter and Bilateral filter
Notice: w=wr*ws

(wr 为像素相似高斯函数, ws 为空间邻近高斯函数)

Weight value

1.ws
Image Processing——Gaussian filter and Bilateral filter
When we process the part which is in the smoothly changing area,the value does not have considerable difference(no margin),in such case the value of w is determined by ws and wr equals 1.
2.wr
Image Processing——Gaussian filter and Bilateral filter
At margin the values have large difference,such that wr is about 0,and w=ws*wr=0, there is no filter at this place (margin), the margin has been saved.

Comprhension about Gaussian Filter(Useful pages)

https://blog.csdn.net/qq_36359022/article/details/80154900
https://blog.csdn.net/qq_36359022/article/details/80188873

Expansion(GMM)

http://www.ituring.com.cn/article/497545

Reality

This kind of image processing is widely used in Computer Vision.
But considering that the image obtained by the computer camra is RGB one. If we want to process it easier, we can transfer it into gray image. (Especially when e only consider the shape rather than the color itself—— Geasture Recognition)
After that we will use inverting gray image to make the aimed object more obvious.
And now it is more easy for us to understand the margin because the value of pixel at margin, one side should be 0 and another is 256.
As for the smooth one, I think one widely use application Photo Shop can help us to comprehend it.

-reference
[1]: https://blog.csdn.net/qq_36359022/article/details/80198890
[2]: https://blog.csdn.net/jorg_zhao/article/details/52687448