The portrait rubs the skin to whiten a key to grind the skin

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.