VF - Dirty Secrets, Dirty Tricks

06 September 2010

Well, the day has finally come. It's time to lay bare all those little white lies which I've fed you so far. I will caution you up front: this will be another moderately technical day. No numbers, and no math, but a bit of cranial expansion just the same.

Like yesterday, in the interest of leaving this readable in a single sitting, I won't go into any great detail about any one point, instead giving you a quick rundown alongside some external sources for more reading. Always feel free to ask questions, though, so that I'll have more than the 2 questions I have currently to answer tomorrow :).

So, without further ado, in no particular order, here we go...

Dirty Secrets:
  • A Gaussian Blur "Wave" is Very Different From a Sine Wave.

    First of all, this does not invalidate the idea of spatial frequencies, of their mixing, or anything else. But it does have some implications for understanding how the frequencies which we're using interact with one another, and how our separations behave. To learn more about what a Gaussian distribution looks like, I recommend this Wikipedia article.

  • The Photoshop Gaussian Blur filter isn't a Gaussian Blur filter.

    Huh? Longtime PS users may remember that GB used to take a lot longer to complete than it does now [on equivalent systems]. And then magically at some point in its history (I honestly can't remember which version it debuted in), lead programmer Chris Cox implemented one of a number of Gaussian approximation functions - functions which give results which are accurate to an actual Gaussian function to within <1% (usually, at least), but which can be performed by the computer 20+ times faster. Again, this doesn't have many real-world consequences for frequency work, but is wonderful geek trivia, and also brings up some ideas which become relevant later.

    It's also worth noting that this gives us a bit of way around the filter's arbitrary 250px radius limit. A Box Blur (which has a maximum size of 999px), run 3x at the same radius is roughly the same as running the Gaussian Blur at that radius.

  • Most People Already Use High Pass Sharpening

    It's called the Unsharp Mask filter. Seriously - USM is exactly the same as HP sharpening as performed by the methods outlined in this series. Now, it doesn't have the advantage of being able to run curves against the result to control highlight / shadow, etc., nor is it easy to perform "bandpass sharpening" with it (accentuating a range of frequencies, so as to exclude the highest components [where noise "lives"] from the sharpening process). But, it is an old friend for many of us, and makes "HP vs. USM" debates quite comical after you learn the truth.

  • Bandstops Lower Total Image Contrast

    You may have figured this out already if you've followed along closely, but removing a frequency band from an image inevitably results in a loss of some % of the image's total contrast. This is best compensated for with a Curves adjustment, but Brightness / Contrast or Levels can also be used. Generally - for small, localized corrections with bandstop filtration this loss is meaningless and can be ignored; for large moves, though (especially simple bandpassing), it's best to make a correction.

  • Bandpass Filtering Can Cause Scaling Issues

    This probably the source of the greatest misunderstanding about any sort of frequency work in skin retouching (aside maybe from the visceral reaction many people have when you tell them that you're going to use a 'blur' filter in high-end work). In short, what looks good at one image size will not always also look good at a smaller size - the interaction of the component frequencies (as well our ingrained expectation of what things 'should' look like) can make skin which looks flawless at full size appear hideous ('plasticy') when resized. The two best ways of handling this are to either keep two windows open within PS so that you can constantly check what the image looks like small, or to use some form of synthetic frequency replacement to provide enough material to make smaller versions look 'right'.

  • Frequencies Have Color

    This isn't so much a 'white lie', as something which we just didn't bring up. Just as certain types of image components tend to "live" in a range of frequencies, sometimes colors do too. Take for example the red checkering of a tablecloth, the blue reflection of a skylight on a tungsten-lit ball, or a model's red hair against a white backdrop. This can lead to difficulty if we make major changes to an image while being careless in handling such colors. On the other hand, knowing this can be a huge advantage once you've mastered it - say goodbye to color moiré!
Dirty Tricks:
  • Skin and Smart Objects

    We talked yesterday about how bandstop filters can be used to retouch skin as a "DeGrunge" / "Inverted High Pass" ("IHP") / etc. technique. The greatest difficulty with this procedure is that - for high end beauty work at least -different regions of the skin will require the removal of different frequencies from an image.

    When you think about it, this makes sense. Not only does the skin have a natural variation in its texture across different parts of the face and body, but just as objects appear smaller the further they are from you, the natural 'frequencies' which make up skin's appearance are also compressed or expanded with varying distance. As a consequence, different portions of the body need different kinds of work (or work on different frequency bands).

    By using a Smart Object copy of the image (or better, just the skin areas), you can quickly duplicate these, change the settings as appropriate, and mask them into your work. Even better, if you're disciplined about using your SO's, if you go back to make changes in the image itself later, they will automatically update through, making this a truly "nondestructive" process.

  • Skin and Selections

    One of the best things you can do when you want to use bandstop techniques on skin is to start with a good selection of that skin area (the Select Color Range tool is great for this), and either save it in a channel or simply copy the skin areas into a new layer [be sure to turn on Lock Transparent Pixels if using a separate layer]. By doing this, you keep the frequency filters from sampling non-skin colors in their processing and "bleeding" those into your result, allowing you a much more better result than you'll otherwise get (the GB filter's edge handling makes this even more important). To wit, Imagenomic's Portraiture relies on this idea to get its results [see discussion here].

    Thanks to my friend Richard Vernon, I'm reminded that the "Apply Image" version of our separation techniques doesn't play nicely with selections - it doesn't handle the alpha channel (transparency) in a way which plays nicely with others.  As such, you need to use the "Brightness / Contrast" version of separating if you mean to use this technique in your skin work.

  • What if We Didn't Use Gaussian Blur to separate?

    Here's one of the 'biggies' - what would happen if we weren't limiting ourselves to separating images with just the method we've been using? I'll let my friend Koray explain in his forum post on the subject. The technical version is that the Gaussian 'kernel' (or 'smoothing operator') is just one sort of 'waveform' which we can decompose an image into. Others like the Median filter (a median operator) and Surface Blur (a bilateral smoothing operator) give results which are more edge aware and gradation friendly - two factors which are immensely valuable in enhancing local contrast (demonstrated by Koray), as well as in separating detail if, for example, we are planning to focus on healing / cloning details to correct blemishes and irregularities.

  • How About Skin Transplants?

    It's one of those things we don't like to talk about as retouchers (at least not in reference to any particular client), but most of us have had an experience where the subject's skin was just in a horrific state in the original photo. One in which we really wished you could just use another model's skin to cover it with. Well, now that you now how to separate frequencies, and you know what frequencies the skin lives in - you can! [Tip: make sure that you match pore size, lighting angle, light quality (harsh, soft), and skin source (which part of the body) when transplanting.]

  • Blown Highlights

    Much like the 'transplantation' discussion above, by working on two frequency components separately, it's often easier to work with parts of an image which have been blown out in camera - instead of that awful gray mess which the healing tool will often give you, two strokes in two different layers will give you an often very believable recovery.

  • Automation

    Everything which we've discussed can be heavily automated in Photoshop - from detail enhancement to skin smoothing, sharpening to stray removal. I highly encourage you to work with Smart Objects in this to maintain a non-destructive workflow, especially so that you can go back and tweak your results as you refine your understanding of visual frequencies.

    Yesterday I provided a set of actions which do a number of the basic GB separations in PS. I challenge you to make more of your own, incorporating as many or as few of the techniques which we've discussed over the past few days as you like. I further challenge you to share these on your favorite retouching forum(s), and to explain what you've done and why to those who ask. The power to separate detail, to enhance it, to heal and clone it, etc. is as big a deal as first learning to adjust global color and contrast with a curve. Share it.

In Closing

I'd like to take a moment to thank everyone over the ModelMayhem Digital Art & Retouching Forum for their participation in the discussions about these and related topics. If it weren't for their interest in the subject and collaboration in elucidating the details, none of this would have been possible. Head on over when you get the chance and see the amazing work these guys have done, both in terms of retouching itself, as well automating every aspect of these processes.

I also want to thank you for your readership over the past week or so as we've gone through what for many of you was likely the most technical discussion of Photoshop you've yet experienced. I sincerely hope that it was helpful. And while my writings on this blog will continue on a multitude of different subjects, I hope that you'll always feel free to ask when you have questions about this topic. As above, this is the beginning of a whole new way of looking at imaging for many of you - one which I hope to make as painless as possible.

Happy Labor Day!

4 comments:

Lanenga said...

Great articles!
You explained this tricky subject very well.

Thank you.

Anonymous said...

I have found all your info so helpful! but i have found that using the high and low frequency layers to retouch the colour and texture of skin ends up leaving the picture look way too sharp. how do i fix this or stop it from happening?

Fred said...

I do have scaling issues when I use the bandpass/bandstop techniques.

When I downsize my image for the web. It's horrible. Just plastic skin.

Even if I constantly check the small version, I can't find the right balance.

I just feel it makes this techique useless if I need a SD and a HD version of my file.

The only workaround I've found is to work on 2 separate files, one for the print and one for the web. I hate it because I need to do the work two times.

Any advice ?

Sean said...

@Anonymous -- Are you sure you've halved the contrast before performing the HP step?

@Fred -- If you take a look at the MM thread, I offer a band-replacement script which generates some multi-frequency noise which can be used to patch a more regular / less obstrusive pattern back into the noise such that it scales better. It's not a perfect solution, but it works.

-