How to achieve Beauty effect with SDK
In this article, the editor introduces in detail "how to achieve beauty special effects in SDK". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to achieve beauty special effects in SDK" can help you solve your doubts.
The following are the specific steps of the work:
1. Skin grinding
Bilateral filtering / guiding filtering / surface blurring algorithms are used to blur the image. Here, we should pay attention to edge-preserving processing to avoid blurring the boundary caused by blurring the face and background at the same time.
Take bilateral filtering as an example. Take out the green channel, blur the green channel, and get the blurred value sampleColor. Then subtract sampleColor from the green channel value of the original image, plus 0.5 (128), these two steps are the high contrast retention in PS.
Vec3 centralColor = texture2D (inputImageTexture, textureCoordinate) .rgb
Float highpass = centralColor.g-sampleColor + 0.5
Then the above results are processed for 3-5 times, and this step can make the noise more prominent.
If (color