Skin filter
Functional needs of the grinding module: filtering out the noise points on the person in the image, which include thallium, colour spots, scabies, etc. Accomplishing this function is usually the smoothing of images using **** margin filter****, an important feature of which is that, after smoothing the image, it is still possible to better retain the edge details of the image, such as the five official details and profile of the person。
The common margin filter algorithms have surface blurry, bilateral filtering, and guidance filtering. The core is the same for this series of margin filter algorithms, which are summed up here,* the nature of the margin filter*: when filtering is done, the pixels on the edge of the image, the filter weights are minimized and the edges remain more complete。
Gaussian filter
The goss filter is a very basic image filter that can effectively contain noise and smooth images, because its filter weight corresponds to the goss distribution, so it's called the goss filter. **** how to calculate weights? *the weight of the goss filter is entered as a feature based on the relative position of the neighbour pixels versus the central pixels,* calculated through some goss mathematical model。
Its specific mathematical model is as follows:
Of these, m, n refers to the location of the filtration nuclei pixels, i, j refers to the location of the pixels at the filter nuclei, sigma refers to the variance of the goss function。
* model explanation: * the longer the filter weight parameters are fixed, the smaller the weight coefficient, the greater the size. In theory, the disadvantage of goss filtering is also more pronounced, i. E. Weighting is based only on information on the location of the neighbourhood pixels and is not bound by colour information, with the effect that if pixels are marginal pixels of the image's outlook, they lead to a blurring of the image's horizon because of the inability to recognize the information on the margin。
Surface blur
**** the surface is fuzzy,* the algorithm is derived from the dermatography filter algorithm in ps, which allows smoothing of non-marginal areas of the image while keeping edges. The algorithm theory is simple and easy to achieve. *the idea at the core* is to set up a square filter with k-long edges, where the power of the square filter is calculated on the basis of the similarity of the adjacent pixel colours and the central pixels, which is then standardized, followed by a weighting of the corresponding pixels and the completion of the central pixel update. * why can the surface be filtered to protect the edge? **** the blurry surface uses similarities between pixels for weighting, and the smaller the adjacent area pixel power value, the greater the difference between the pixels and the central pixels, it also corresponds to the physical characteristics of the image edge, i. E. The difference between the pixels at the edge of the image is greater than the pixel value in the non-marginal area, so that the filter retains the characteristics of the marginal pixels to a greater extent when updating the pixels on the edge, which is why it can blur the image's non-margins when it protects the edge。
Specific**** mathematical models**** are as follows:

Of which r is the radius, y is the threshold and is used to maintain a fraction of less than 1, x i is the pixel value in the filter, x 1 is the current central pixel value and x is the output result。
**** model explanation: *** the weight of the algorithm requires constant updating and therefore the time consumption of the algorithm is high. The function of y is to ensure that the differential score is less than one, so that the range of similarity calculations is within (0,1) and that the core idea is weighted, normalized and obtains output centre pixels。
Bilateral filter
*the bilateral filter* is based on an upgraded version of the gaussian filter, which uses only location information compared to the gaussian filter, which also includes colour distance information. The significance of adding colour distance is that the filter is given a message that identifies the edge of the image, thus having a better retention effect when filtering the edge, and a good smoothing effect on the non-marginal area. * how do we identify the edges of the image? * for digital images, the edge of the image has a very distinguishing feature, which is that the gradient at the edge of the image is much larger than in the non-marginal area in general, and implies a mutation of the colour grade at the edge of the image. When the filter slider slides to the edge of the image for volume, in a case where the edge pixels are central pixels, most of the weighted pixels retain the characteristics of the edge pixels, i. E., the image edge, because the colour values on both sides of the edge line vary considerably, resulting in the non-marginal area pixels having a smaller weight than the pixels obtained on the edge. It can also be understood * in another angle, i. E. To divide or classify the adjacent area to be used for filtering in accordance with pixel values, then to give the relatively high weight to the category to which the point belongs, and then to make a neighbourhood weighted sum with the final result。
Here's a mathematical model for bilateral filters****:
Gs indicates weight in the space domain and gr indicates colour value area weight, both of which are obtained through the goss function。
Bf refers to the output pixel value of the filter nuclei, wq refers to the weight sum of the filter nuclei, which is used to standardize the weight, ip refers to the input pixel value of the filter nuclei, and iq refers to the neighbourhood pixel value。
It can be seen from the formula that the bilateral filter results are calculated by **** spatial domain and pixel domain**** using a goss function, then weighted with a neighbouring pixel, and eventually updated pixel bf。
The bilateral filter **** figure represents *** * the figure below, which refers to the image greyscale texture at the edge of the original map, and the figure b indicates the bilateral filter at the boundary of the original map, and the figure c indicates the image greyness texture at the edge of the output image after the filtering. As can be seen in figure a, where the original image boundary is located, there is a mutation in the grey gradient of the image; in figure b, there is a large difference between the weights of pixels and the weights of non-border pixels at the boundary of the bilateral filter core, where the weights of the smoothing area are distributed by gauss and the power values of the edge mutations are sharply declining; and in figure c, where the filtered image retains the gradients of the edges, while the non-marginal areas are smoother。

**** bilateral filtering parameters? * bilateral filters contain three main parameters, filter nuclei, spatial domain standard differences, and spatial domain standard differences. *the larger the size of the filter *, the larger the information reference, the larger the filter, the smoother and blurred the image;* the space area variance* determines the sensitivity of the filter to the space area, the greater the difference, the shorter the gosse function, the more even the weight distribution, the less sensitive the filter checking space, the better the image is smoother and blurred, and the better the image is formed. *the pixel value range difference**** determines the sensitivity of the filter to the value field, the greater the variance, the shorter the goss function is peaceful, i. E., the more even the distribution of weights, which leads to an insensitive range of filtering checks, the lower the protection of the edges, and the opposite。
Bilateral filter **** advantages*, as noted above, can be smoothed while keeping edges. However, it is also clear that the computational complexity is related to the size of the goss nuclear, with the algorithmic time complex of o(mk^2), m referring to the number of image pixel points, k referring to the size of the nuclear, which requires constant updating and time-consuming。
**** the core idea of the two filter algorithms is consistent with the difference between bilateral filters and surfaces,*** both of which take advantage of the large gradients on the edges of the images and the wide variety of colours, and the inconsistent use of pixel position information in bilateral filters over the vague surfaces, which is more conducive to smoothing the images, which can be compared with objective indicators such as psnr. It could also be considered a simplified version of the bilateral filter, which reduces the index calculation of the bilateral filter, optimizes the computational complexity of the algorithm and compares the filter effects with actual experiments。




