RetouchPRO

Go Back   RetouchPRO > Technique > Photo Retouching
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Retouching "Improving" photos, post-production, correction, etc.

Automatic Skin Smoothing.

Reply
 
Thread Tools
  #131  
Old 11-03-2010, 10:13 PM
ShadowLight ShadowLight is offline
Senior Member
 
Join Date: Oct 2009
Posts: 397
Re: Automatic Skin Smoothing.

Quote:
Originally Posted by bakerser View Post
Right, but while you're correct to think that an image-size independent settings guide is good for novice users (at least, 'novice' WRT FS), you're failing to account for the amount of image area covered by the skin in all images which might be used.
the calculations are done for a closeup portrait, in other words for image where the face is in almost all of the frame, so I have covered the highest R that is required for the image corrections.

anything smaller (like wedding photography) will need smaller R.
The range is not limited on the low side, so in this case it is not a problem, all they need to do is to slide the slider to the left until they get what the look they like.


its ironic that you call me a "novice" when you obviously disregard all empirical tests, and the ones you make are poorly constructed, not relevant and just produce misleading results.

The fact is that applying c-50 before hp/gb will throw away information/details that are useful for hp/gb, and if anything, using the "fill" after gb/hp will give you more precise results, so if you have any slights differences it is from there.

using "apply" to calculate the HP theoretically will be better, however practically when you work on an image and you have set a bandpass it will not make any difference.

when it comes for splitting an image to edit only specific frequency band I do use "apply", but that is a whole different technique. There it does make a difference, but again... it is not relevant in this case.

anyway, I made you a PSD for you to "Examine".
Ironically enough the "Fill" there actually is slightly more precise than the "c-50" (I just explained why), so now I gave you a proof that I don't "fake the results"...

and I think I will leave it at that.
Reply With Quote top
  #132  
Old 11-03-2010, 10:52 PM
bakerser bakerser is offline
Member
 
Join Date: Jan 2008
Posts: 91
Re: Automatic Skin Smoothing.

Quote:
Originally Posted by ShadowLight View Post
the calculations are done for a closeup portrait, in other words for image where the face is in almost all of the frame, so I have covered the highest R that is required for the image corrections.
That's your choice to make I guess.
Quote:
Originally Posted by ShadowLight View Post
its ironic that you call me a "novice" when you obviously disregard all empirical tests, and the ones you make are poorly constructed, not relevant and just produce misleading results.
Please let me know where I called you a "novice". If you're confused about where I said that your application was good for novices, then you have simply misunderstood what I wrote. As for the rest of your statement, well, at this point we'll just let the PSDs speak for themselves. I know my tests are good and continue to demonstrate as much.

That said, I do appreciate you finally putting a PSD up. The hosting offer stands if you should choose to continue to participate in this discussion.
Quote:
Originally Posted by ShadowLight View Post
The fact is that applying c-50 before hp/gb will throw away information/details that are useful for hp/gb, and if anything, using the "fill" after gb/hp will give you more precise results, so if you have any slights differences it is from there.
Asserting something doesn't just make it so; while repetition is the key to adult learning, it's not also the key to unlearning too .

If the information lost is so important to you in the -50C process, a 2-layer bandstop version of your app should be your highest priority, as it will be truly "lossless", and while it would bloat filesize a bit, it would be pretty cool to have that level of control (and would ironically be nice for your 8bit users as well!).
Quote:
Originally Posted by ShadowLight View Post
using "apply" to calculate the HP theoretically will be better, however practically when you work on an image and you have set a bandpass it will not make any difference.
I posted a PSD earlier which, from an image which can only be called 'easy' for this sort of work and using your own settings mind you, demonstrated a 3/256 loss of data relative to the gold standard. How is that 'not making any difference', especially when we know raw images could be much, much worse?
Quote:
Originally Posted by ShadowLight View Post
when it comes for splitting an image to edit only specific frequency band I do use "apply", but that is a whole different technique. There it does make a difference, but again... it is not relevant in this case.
How is a frequency bandstop application not editing a frequency band?
Quote:
Originally Posted by ShadowLight View Post
anyway, I made you a PSD for you to "Examine".
Ironically enough the "Fill" there actually is slightly more precise than the "c-50" (I just explained why), so now I gave you a proof that I don't "fake the results"...

and I think I will leave it at that.
And in turn I've updated my PSD from above in response to what you suggest. I'll link it again below for convenience.

It now has three versions of the IHP data organized into two groups for quick comparison. The bottom layer of each group is the "Apply Image" calculation of the frequency band to be removed and serves as the gold standard (as it has been) for the test. In the upper group we have the SkinSmooth result for the same calculation, set to Difference mode so as to show off where it's not the same as the 'right' answer. In the lower group, we have the -50C result, also set to Difference mode.

Quick examination will reveal that the -50C version is within 1/32k at any given pixel of the gold standard with an even distribution of that error across the image (no clumping, blotches, etc. to cause false texture later on), while the SkinSmooth attempt is as far as 371 levels away and tends to have 'bands' of inaccurate results.

That's not more precise in any form of math I've ever done.

PSD

P.S. - A couple of quick reminders about proper forensic eyedropper / Info palette use:
  • Make sure that you're at 100% or greater. Anything less will give you false values.
  • Be sure to check that the Eyedropper tool is set to Single Pixel reading, as even the marquee tool will obey this setting when used to guide the Info palette.
Reply With Quote top
  #133  
Old 11-04-2010, 03:43 AM
ShadowLight ShadowLight is offline
Senior Member
 
Join Date: Oct 2009
Posts: 397
Re: Automatic Skin Smoothing.

You have a point, but... life is not so simple.

So... let's make a direct comparison:
HPdiff-test.psd


As you see when you subtract one correction from the other to see not only the difference, but what information is more in which layer, you can see that one of the techniques will make stronger corrections on the larger curves, the other will make stronger correction on the blotches.
(with the chosen settings for the test)

As we are just correcting a bandpass the difference would be superficial and it could be adjusted with the slider to whatever setting is desired.



I added comparison with the C-50 applied before gb/hp and after (there is some difference).

I did also test the "custom filter" but the result doesn't look good.

all tests are in the psd.
have fun
Reply With Quote top
  #134  
Old 11-04-2010, 05:20 AM
bakerser bakerser is offline
Member
 
Join Date: Jan 2008
Posts: 91
Re: Automatic Skin Smoothing.

Quote:
Originally Posted by ShadowLight View Post
You have a point
You should have just stopped there .
Quote:
Originally Posted by ShadowLight View Post
So... let's make a direct comparison:
HPdiff-test.psd
Thank you for providing your examples again.
Quote:
Originally Posted by ShadowLight View Post
As you see when you subtract one correction from the other to see not only the difference, but what information is more in which layer, you can see that one of the techniques will make stronger corrections on the larger curves, the other will make stronger correction on the blotches.
(with the chosen settings for the test)
Why are you comparing the results to one another while trying to establish superior quality? Quality can only be determined by referring back to something which is known to be good - in this case, an "Apply Image" version - and then choosing the one which is closest to that known result. That the two give different results is by now very, very well established and proves neither of our's points.
Quote:
Originally Posted by ShadowLight View Post
As we are just correcting a bandpass the difference would be superficial and it could be adjusted with the slider to whatever setting is desired.
No, you are performing a bandstop operation. And the only way that a difference between the options is correctable via a slider is going to be if they are linearly offset from one another (constant subtract / difference value) or if they are linearly scaled relative to one another (proportional to the original image brightness). Neither is the case, as demonstrated by the 'blotchiness' you refer to. Those 'blotches' are local contrast differences brought about by the math errors which the -50F technique is introducing and will never be corrected by a slider (or, at least not any that we're talking about).
Quote:
Originally Posted by ShadowLight View Post
I added comparison with the C-50 applied before gb/hp and after (there is some difference).
There is some difference, but let's not get into the 'why'. It's a rabbit hole, and neither of us is contending that -50C after the fact is a good implementation.
Quote:
Originally Posted by ShadowLight View Post
I did also test the "custom filter" but the result doesn't look good.
User error - you put the Custom filter last, when it should have been first. Putting it first does exactly what I said it would - a result within 1/32k of the Apply Image version at every pixel while retaining full dynamic functioning.
Quote:
Originally Posted by ShadowLight View Post
all tests are in the psd.
have fun
You should go back and redo those, for yours and the sake of everyone reading. I don't know exactly how you're doing it, but you're starting with different versions of the base image for each copy, exaggerating both the difference between each of our methods and grossly exaggerating the difference of both from 'ground truth'.
Reply With Quote top
  #135  
Old 11-04-2010, 06:01 AM
ShadowLight ShadowLight is offline
Senior Member
 
Join Date: Oct 2009
Posts: 397
Re: Automatic Skin Smoothing.

Quote:
Originally Posted by bakerser View Post
Why are you comparing the results to one another while trying to establish superior quality? Quality can only be determined by referring back to something which is known to be good - in this case, an "Apply Image" version - and then choosing the one which is closest to that known result.
Actually I showed you that the results are different but that doesn't mean one is worse than the other.

If you were right, you would have had one of the examples with lower performance, not "different".
It they were just the same, but one of them with clipping as you so persistently claim, it wouldn't have had different range, it would have been just clipped/less range of corrections.

You did prove that contrast-50 gives the same result as "Apply", however I just showed you that SkinSmooth creates slightly different bandpass, so what you were actually comparing is 2 apples and 1 orange.
so... it's not a "bad apple" it's an orange.. and ... just invalid result of your test.

When I have some more free time I'll make a comparison with higher resolution
image, so everyone can compare the results and what kind of correction each technique makes.
(but as you see... there is no "clipping" )
Reply With Quote top
  #136  
Old 11-04-2010, 08:24 AM
ShadowLight ShadowLight is offline
Senior Member
 
Join Date: Oct 2009
Posts: 397
Re: Automatic Skin Smoothing.

So... after a whole bunch of mudding the water before everything gets lost in disinformation and imaginary precision targets I'll summarize everything and hopefully this will clear the raised issues.


First and foremost - clipping? is there one?
A: - No.
The only way you can get the so mentioned "clipping" will be if you override the SkinSmooth's calculated values for HP/GB. In reality it is not a clipping at all, but details from the original image start to show.
see the attached image: SmoothClipping.jpg
To get this problem you need to be retouching a very small image, and force HP to a very large number. As shown in the example, the maximum HP SkinSmooth calculates for possible use is r:18. However even if you push it with an override to r:90 you still don't have the so mentioned problem. Only when you get over r:200 you start to get some details back from the original. (this was the big "issue" that was deemed "clipping the image")

Why do you use Fill/opacity and not contrast -50 or custom filter?
- "contrast -50":
The issue with contrast -50 for this specific use is that applied it is dependent on the mean brightness, which can change if you make changes to the background, but even if it were not an issue Brightness/Contrast cannot be stacked as a filter on a Smart Object. It could be used inside the smart object, but this will hamper the dynamic operations as the slider "strength" will have to be able to change those values on the fly.
- "custom filter":
Although that sounded like a good alternative, the use of the filter produced very poor results, so there was no sense using it.

How big is the difference between the results from Contrast -50, and Opacity 50%?
- see attached image: Compared(to_contrast-50).jpg

So are there differences?
- Yes. But quite small.

Are the differences due to image clipping?
- No.
It appears the bands are slightly different but there is no clipping whatsoever.

The Contrast -50 matches a band pulled with "Apply" Split- (not tested by me, but lets assume it is correct), the band created by Opacity 50%, appears to be slightly shifted/different to the Contrast -50.
Subtracting one of the results from the other shows how much more information one has over the other, and as you see both have information that the other does not have (from a slight shift), however it appears that Contrast-50 has more details left (which makes Opacity50 slightly stronger in smoothing the skin).
see attached image: Smooth-C50_subtract.jpg
however as you see this is "pixel-splitting" not visibly detectable without the extreme boost.


If you like to examine the differences up close here is the PSD (about 100mb):
Compare(to_contrast-50).psd

This does answer all that it has to do with SkinSmooth and the used techniques, and I kindly ask Sean if he wants to have a technical discussion on something that is not directly connected with SkinSmooth (or has been answered) to make the discussion in a new thread. Thanks.
Attached Images
File Type: jpg SmoothClipping.jpg (96.2 KB, 56 views)
File Type: jpg Compared(to_contrast-50).jpg (96.7 KB, 40 views)
File Type: jpg Smooth-C50_subtract.jpg (90.3 KB, 34 views)

Last edited by ShadowLight; 11-04-2010 at 04:28 PM.
Reply With Quote top
  #137  
Old 11-04-2010, 06:59 PM
bakerser bakerser is offline
Member
 
Join Date: Jan 2008
Posts: 91
Re: Automatic Skin Smoothing.

Quote:
Originally Posted by ShadowLight View Post
Actually I showed you that the results are different but that doesn't mean one is worse than the other.

If you were right, you would have had one of the examples with lower performance, not "different".
One did fail to perform. I'll quote you again a bit later on where you tried to state just as much, and I'll go on to remind you then as I will now that you need to compare each alternative to a known good in order to know anything about whether either is performing. I did that in the test which I posted previously. I don't know how you could have missed it, but the fact that -50F gives an inferior result is the truth whether you care to acknowledge it or not.
Quote:
Originally Posted by ShadowLight View Post
It they were just the same, but one of them with clipping as you so persistently claim, it wouldn't have had different range, it would have been just clipped/less range of corrections.
Back up a second. I did not say that clipping always occurs; I said that clipping can occur and that good algorithm design takes into consideration both the best and worst case scenarios. Yours is only acknowledging the best cases and is ignoring the worst (those who need an app like this most, btw).

And of course they have different ranges. In one case you're taking 512 potential values and retaining only the central 256. In the other case you're taking the 512 values and scaling them down to 256. The scaling factor gives the former twice the potential contrast, but at a cost. That is, while the latter option avoids the loss of spatial information (sort of crucial piece to this, right?), the former loses an amount of spatial data proportional to the original local contrast. Thus resulting in the 'bands' which we've started talking about.
Quote:
Originally Posted by ShadowLight View Post
You did prove that contrast-50 gives the same result as "Apply", however I just showed you that SkinSmooth creates slightly different bandpass, so what you were actually comparing is 2 apples and 1 orange.
The same formula can only create one type of band, no more and no less*. As such, any difference between the versions created is a result of the quality of the method. Being further from the known accurate version is worse; closer is better.

Yes, you demonstrated a heretofore unknown fact that there are two ways that Brightness / Contrast can be applied in an image. But there is no such analog for the gaussian kernel - it's just the one lonesome way of outputting results.
Quote:
Originally Posted by ShadowLight View Post
so... it's not a "bad apple" it's an orange.. and ... just invalid result of your test.
As above.
Quote:
Originally Posted by ShadowLight View Post
First and foremost - clipping? is there one?
A: - No.
The only way you can get the so mentioned "clipping" will be if you override the SkinSmooth's calculated values for HP/GB.
This is untrue. You continue to fail to account for skin area within the image and the degree of local contrast. I know, I know, your panel scales values to the image size and is tuned for what you think a beauty shot needs, but that still doesn't allow for variation in the input local contrast. It's an interface gimmick (a good and useful one of course), but lends nothing helpful whatsoever to the image processing going on behind the scenes. It certainly doesn't protect against the clipping which has been demonstrated and does reduce the quality of output.
Quote:
Originally Posted by ShadowLight View Post
In reality it is not a clipping at all, but details from the original image start to show.
And that's because you clipped your bandstop. I've demonstrated that before and am happy to again for you if you'll look at the PSD this time.
Quote:
Originally Posted by ShadowLight View Post
see the attached image: SmoothClipping.jpg
To get this problem you need to be retouching a very small image, and force HP to a very large number. As shown in the example, the maximum HP SkinSmooth calculates for possible use is r:18. However even if you push it with an override to r:90 you still don't have the so mentioned problem. Only when you get over r:200 you start to get some details back from the original.
Still holding onto only the best-case samples, you continue to only factor radius into this. By now I should hope that even if by rote you were realizing that contrast over area is what is key; not just the radius under consideration. Clipping occurs because of an excess of contrast. Radius determines the area in which the sampled contrast comes from. Exceeding the bandwidth of the filter results in clipping. It's that simple.
Quote:
Originally Posted by ShadowLight View Post
(this was the big "issue" that was deemed "clipping the image")
It was an issue. And the clipping, as I've now said dozens of times, occurs in the bandstop, in turn lowering the tool's ability to remove unwanted features.
Quote:
Originally Posted by ShadowLight View Post
Why do you use Fill/opacity and not contrast -50 or custom filter?
- "contrast -50":
The issue with contrast -50 for this specific use is that applied it is dependent on the mean brightness, which can change if you make changes to the background, but even if it were not an issue Brightness/Contrast cannot be stacked as a filter on a Smart Object.
Here is the PSD demonstrating that mean image value is meaningless to this type of operation. I thought you'd seen it, but guess you missed it.
Quote:
Originally Posted by ShadowLight View Post
It could be used inside the smart object, but this will hamper the dynamic operations as the slider "strength" will have to be able to change those values on the fly.
Actually, that's another thing I've been wanting to bring up with you. You really ought to simply be applying the 'Strength' result to the SkinSmooth layer itself vs. anywhere else. Doing it to the SO means that all the filtration has to be recomputed (and will have some small amount of spatial shift due to your current implementation) in order to effect a change, whereas the layer Fill itself could be providing this down to a granulation of 1% (which for most samples will be in the .1-.3 level increments).
Quote:
Originally Posted by ShadowLight View Post
- "custom filter":
Although that sounded like a good alternative, the use of the filter produced very poor results, so there was no sense using it.
As before, you were using it wrong. If you'd bothered to look at the PSDs offered to you, you'd see that it actually produces the Apply Image result.
Quote:
Originally Posted by ShadowLight View Post
How big is the difference between the results from Contrast -50, and Opacity 50%?
- see attached image: Compared(to_contrast-50).jpg
Again, always focusing on the best case scenarios. This is like Microsoft when Vista first came out saying, "But it works some of the time!".
Quote:
Originally Posted by ShadowLight View Post
So are there differences?
- Yes. But quite small.
... in the situations which you've been testing. At the end of the day I told you at MM and here again that if you prefer the aesthetic result of what you're doing to the alternative, by all means use it! But don't claim any sort of technically sound procedure to be going on under the hood - it's a slick, forced version of what byRo started here years ago. An amazing accomplishment for its time, the community has since moved on to better methods.
Quote:
Originally Posted by ShadowLight View Post
Are the differences due to image clipping?
- No.
Yes they are. As above.
Quote:
Originally Posted by ShadowLight View Post
It appears the bands are slightly different but there is no clipping whatsoever.
As there is only one gaussian kernel in PS, please explain to us how this occurs, then.
Quote:
Originally Posted by ShadowLight View Post
The Contrast -50 matches a band pulled with "Apply" Split- (not tested by me, but lets assume it is correct)
Wait a minute. You've been blathering on here using words like "accuracy", "precision", "quality", etc. -- but you've never even compared the results of any of these methods to a gold standard?
Quote:
Originally Posted by ShadowLight View Post
, the band created by Opacity 50%, appears to be slightly shifted/different to the Contrast -50.
-50% Opacity or -50% Fill? You keep changing this, and I want to be sure I'm getting it right for comparison.
Quote:
Originally Posted by ShadowLight View Post
Subtracting one of the results from the other shows how much more information one has over the other, and as you see both have information that the other does not have (from a slight shift), however it appears that Contrast-50 has more details left (which makes Opacity50 slightly stronger in smoothing the skin).
It shows how different they are; it does not show 'how much information' one or the other has; only the difference from one to the other. This is why you have to compare each to something which is 'known good' so that you can tell which really has 'good' information and which is artifact. Will you really want that -50F (-50O?) version when you realize that not all of that 'detail' is supposed to be there?
Quote:
Originally Posted by ShadowLight View Post
If you like to examine the differences up close here is the PSD (about 100mb):
Compare(to_contrast-50).psd
Thank you.



And P.S. - sorry that it's taken me so long to get back to you. Busy day today .



* There is a way that there can be more than one, but it is (thankfully) not at play here and is not likely to be encountered for most users. Just the same, huge bonus points to anyone in the peanut gallery who can both identify the other PS-internal way and describe why its different.

Last edited by bakerser; 11-04-2010 at 09:37 PM. Reason: t y p o s
Reply With Quote top
  #138  
Old 11-04-2010, 08:05 PM
bakerser bakerser is offline
Member
 
Join Date: Jan 2008
Posts: 91
Re: Automatic Skin Smoothing.

It occurs to me that the references above to 512 vs. 256 values might be confusing to some reading this, and so I'll quote myself from another site explaining the relevance:

Quote:
Originally Posted by bakerser
HF data by its nature is always relative to the LF. Notionally (good enough for discussion), the original image has a range of 256 values. The LF also has a range of 256 for its values (blurring, mathematically, always moves values towards the center, and will never increase beyond 256). But because the original image and the LF can both have the same range, the HF (which gets us from one to the other) must have a range twice that - of 512. Obviously this defies the data types which PS uses internally (where we can only be 0-255), and this leads to the builtin filter clipping values at 0 or 255 when they shouldn't be.

...

If you're the math type...

OI = Original Image
HF = High Frequency component
LF = Low Frequency component

OI = HF + LF

HF = OI - LF

HF = {0-255} - {0-255}

HF = {-255 - 255}

Calculating HF before halving contrast means that everything which should be {-255 - -128} clips to 0, and that everything which should be {128 - 255} clips to 255. This then gets mapped back to {-63 - 64} when the contrast is halved later.

OTOH, if the contrast of the image is halved up front to {-63 - 64} and then the HF is calculated, we have values of {-127 - 128} which occupy the full contrast range of the image format.
Reply With Quote top
  #139  
Old 11-05-2010, 11:04 AM
ShadowLight ShadowLight is offline
Senior Member
 
Join Date: Oct 2009
Posts: 397
Re: Automatic Skin Smoothing.

As I gave you an example, to get to the so called "clipping" problem
(where you actually do not get a clipping, but feedback with details from the original image),
you need to override the application's settings with about 10x higher values.
And this is only possible if you use a small image. (up to 400x600px)
example


When it comes to comparing the two techniques, I made you a real-life example for comparison.

Just noticed that since the image was quite big, the rendering had proxy PS bug.
Attached is the comparison that shows with which technique how much more detail is left out, and what kind. (this time rendered by PS properly)

As you see Opacity50 leaves more detail (after smoothing) in the highlights
and smooths most of the mid-tones.
Opacity50

Where Contrast-50 leaves more detail (after smoothing) in the midtones,
and smooths out the highlights.
Contrast-50


It's a real-life example with the actual results that you will get using both techniques. If you (Sean) have a problem with that... it's your problem.
The comparison images are boosted as before so the differences can be visible (in reality they are only a few digits away from each other).

(the comparison is from the same PSD as before, so nothing is changed in the settings)
Attached Images
File Type: jpg Opacity50_extra-details.jpg (84.4 KB, 19 views)
File Type: jpg Contrast-50_extra-details.jpg (97.6 KB, 22 views)

Last edited by ShadowLight; 11-05-2010 at 08:17 PM.
Reply With Quote top
  #140  
Old 11-05-2010, 08:13 PM
Aladdin's Avatar
Aladdin Aladdin is offline
Senior Member
 
Join Date: Jul 2008
Location: NJ/NY
Posts: 444
Re: Automatic Skin Smoothing.

Hum mm....... Never mind.....
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Retouching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Glamour retouch challenge here!!!! superkoax Photo Retouching 332 02-08-2011 09:52 PM
Automatic Skin Tone Retouching - Seeking feedback Pixarra Photo Retouching 15 11-09-2010 01:38 AM
Skin Smoothing Technique (Again) Novi Photo Retouching 10 10-16-2008 04:25 PM
need help doing pageant eyelashes and skin smoothing w/ photoshop cs sandylavallie Photo Retouching 3 05-06-2005 08:53 AM
skin smoothing action john_opitz Photo Retouching 10 08-21-2002 10:48 PM


All times are GMT -6. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved