The paper briefly discusses the skin retention function of the bovine image software and its implementation details.

Source: Internet
Author: User
Tags domain transfer

A few years ago wrote an article about Beep, I once said that beep noise can be used to grind the skin, and give the conclusion beep than can be cow and the effect of the picture is better, now it seems that the conclusion is too exaggerated and fixed. Different people's aesthetic difference, the same person at different times of the aesthetic will also have a difference, now it seems, I feel that can be cow image with skin retention effect of the grinding skin more natural, but also more in line with the actual situation.

In the previous days, and casual Baidu, the next PS of the grinding of the tutorial, see a lot of the examples have seen, but also saw some of the article at that time. This includes the process that http://www.missyuan.com/thread-468975-1-1.html is talking about here because it sees its second step as:

2. Use the insert to grind the skin

This step is important, directly affecting the final effect, polishing some, do not worry about textures.

Pinghu teacher may use the neatimage, I use here is the portraiture, the Red box slider is pulled to the maximum.

At that time, I did not have neatimage, and did not install portraiture, so this tutorial will not be dismissed.

When I browsed this tutorial again, finally withstand the heart of my own experiment, although I still do not install neatimage and portraiture, but can be directly with the PS to replace the surface blur, although the effect will be different, but does not affect the core effect of the algorithm. The fact proves once again that the truth is that others speak 1000 times better than they feel at once.

Then one of the most critical effects of this tutorial is to wear the skin while retaining the skin, very similar to the effect of the bull image, and many times the practice has proved that can be cow software 100% is also a similar process.

Let's take a list of the simple steps for that tutorial as follows:

1, copy a layer, we define the change layer name is Highpass

2, with the plug-in highpass layer grinding skin;

3, the application image, the mode selection minus, the scale value is 1, the deviation 128;

4, change the highpass layer blending mode to linear light, the opacity appropriate value.

5, the Highpass layer is Gaussian blur, fuzzy radius of 0.5-2 or so.

Basically it's done, and there seems to be nothing sophisticated.

As for the effect: we test it with a few actual images (the second step is replaced by a surface blur).

Texture map result Diagram (surface blur parameter radius =10, Threshold =16) required for original speckle

Texture map result Diagram (surface blur parameter radius =10, Threshold =50) required for original speckle

For the implementation of the program, we analyze each step in the corresponding analysis, for convenience, we assume that the original image layer is the SRC layer.

(1) Duplicate layer: This is nothing to say, just allocate a memory of the same size, and then memcpy function copy src to highpass layer.

highpass= Copy (SRC);

(2) Highpass: This algorithm can be selected: surface blur, guided filtering, bilateral filtering, anisotropic diffusion, BEEP, local mean variance, Domain transfer, Adaptive manifolds, local Laplacian Filters and so on any epf-filter with the edge effect, here is not much to say.

The expression is: Highpass = Epf-filter (highpass);

(3) Apply Image: Here the interface seems to be very complex, the code is not very complex, in fact, the code is simple scary, is the following calculation formula:

Hihgpass = highpass-src + 128;

It seems that this formula is not very familiar with, yes, this and high contrast retention algorithm is exactly the same, but Photoshop embedded High contrast reserved is Gaussian blur, here is the EPF filter.

(4) From a programming point of view, to the above process of the fourth and fifth steps to change the order, otherwise you will get the wrong result, so here Fourth step is:

Highpass = Guassblur (Highpass, Radius);

Where radius is the radius of the Gaussian blur.

(5) Layer blending: The calculation formula for linear light blending is simple:

Assuming that two adjacent layers X and y,x are below, y is above, X is mixed with Y, X is the base color, y is a blend, and x is the result color Z, for the linear light blending mode, the formula is:

Z = X + 2 * Y-256; (originally thought is-255, after using PS CS6 verification is-256)

The formula for the opacity is simpler, and if opacity represents the opacity of Y, the composition is:

Z = (X * (100-opacity) + Y * Opacity)/100;

So the two combined formulas are:

Z = (x * (100-opacity) + (x + 2 * Y-256) * Opacity)/100;

Combined with the above five steps, the final calculation formula is:

      Dest = (SRC * (100-opacity) + (src + 2 * guassblur (Epffilter (src)-src + +)-) * Opacity)/100;

In general, the algorithm is not particularly complicated, the key to restore the skin texture of the steps is the fourth step of the Gaussian blur, the radius is generally larger, the stronger the texture, but too large, the effect of grinding skin is not, therefore, here need to grasp the appropriate degree, the general radius between 0.5-2 is more appropriate.

As for why use this Gaussian blur can restore the texture of the image, I actually have some ideas, but not yet mature, temporarily regardless of him, know the results and no matter why sometimes is also a kind of happiness.

Then say the parameter problem of the algorithm, as the beauty of the application of this function, each app wants to give the user less than a fool (intelligent) parameters, in this process, such as the second step, there must be a lot of optional parameter configuration: If the use of surface blur, you need to determine the radius and threshold value If using guided filtering, RADIUS parameters are generally required. How to determine the corresponding internal parameters according to the parameters in the user's UI (such as the degree of abrasion), it is necessary to do many debugging and experiments for each different filter, this is not a fixed law can be followed.

Then as the third step to apply the image of the constant 128, in fact, it is not necessarily a fixed value, if you turn him up, then the overall image of the processing after the light, small, the image is dark.

The fifth step of the layer's opacity parameter is also a reason, if the opacity value of the larger, then the overall picture of the image may be too much, small, then the image will be too vague, perhaps a 50% is a good choice, or oneself according to the processing of some indicators of the texture map to do a better algorithm.

The speed of the algorithm in fact depends mainly on the second step, that is, the EPF filter, this is a good place to recount, not many words.

The second is Gaussian blur calculation, Gaussian Blur must have floating point calculation, which for mobile phones and other hardware, may be a mishap. And if the box is blurred or linear blur, then there is a problem is the minimum amplitude of the fuzzy radius of 1 o'clock, texture recovery is a bit too much, especially in my program, Gaussian fuzzy calculation with almost 1/3 of the total time.

If you look at this process, you can think that any of the matte algorithm in the United States is just the second step of the process, if he is added to the subsequent treatment, also can have and can be similar to the effect of cattle.

Finally despise the speed of the grinding algorithm of the cow and the Beauty diagram program (I mean the speed of the program on the PC):

I used the grinding method based on local mean variance and sharpening process time-consuming for the second so-called beauty of the average time spent about 35MS (based on the surface blur), 25MS (based on the mean variance);

But the ox or the beautiful picture I estimate feels, at least must have about 1000ms.

So a similar PS tutorial, such as here: http://www.psjia.com/photoshop/photops/2012/0106/3891.html a few process algorithms is actually very simple, and also has a pretty good effect, And if you consider it from the implementation, just a few steps:

1 255);

In the end, we compare the results of the following: Bull, Mei, and this article.

The degree of intelligent blur of the original Tumeto is deep

The abrasive strength of the cow 5 the grinding effect of this paper

It can be seen that the effect of this article and can be very close to the cow, can be described can be used in cattle also the algorithm.

Attach a test procedure that is done according to the process of the so-called Pinghu law: Imitation can New Mapit effect. rar

LAVIEWPBT Time: 2015.8.6 contact qq:33184777 Reprint Please keep our information **********************

The paper briefly discusses the skin retention function of the bovine image software and its implementation details.

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.