I have always been on the grinding of the algorithm is not interested in the original intention or beautify the natural scene, so reader if you are interested in portrait beautification, you can see people on the trip blog.
The previous impression of the skin is only a smoothing edge filter to deal with, but the journey this time to do the work is grinding skin, simply look at. The method is also very simple, on a formula, I tested with MATLAB, really very effective.
Dest= (src∗ (100−opacity) + (Src+2∗guassblur (Epffilter (SRC) −src+128) −256) ∗opacity/100 = (src * (Dest) + (src + 2 * Guassblur (Epffilter (src)-src + 128)-256) * Opacity)/100
Here Epffilter is a side-preserving filter, bilateral filter, directional filter, Domain transform filter can be.
As for why this can be done. The journey said, there is no need to understand what is behind the truth. Well, I kind of agree.
is a formula, direct coding is OK.
I= double (imread (' 1.jpg '));
H = RF (i,30,100)-I + 128;
G = IMFilter (h,fspecial (' Gaussian ', [3 3],100));
opacity = m;
Dest = (i* (100-opacity) + (i+2*g-256) *opacity)/100;
Imshow ([Uint8 (I) uint8 (Dest)]);
Here, I am using a recursive domain transform filter RF \text {RF}. Plus the previous read image and the final display image is only 6 lines of code. By the way, it's best to set up a program interface, because you need to adjust the relevant parameters to achieve the best results. effect (in turn, the input, grinding, grinding Pimeb)
Read more
A simple discussion on the skin retention function in cow image software and its implementation details, people on the journey Licenses
author |
Date |
Contact Way |
The wind blows the summer |
August 14, 2015 |
Wincoder#qq.com |