Getting Around in GIMP - Skin Retouching (Wavelet Decompose)
I have looked around quite a bit for a good method in GIMP to smooth skin for portrait work. I did find a few tutorials, but they all were mainly concerned with using Gaussian blur with a layer mask to “smooth” the skin. The results were almost always less than satisfactory.
(For more examples of this technique at work, have a look at my recent shoot with Mairi! or The Open Source Portrait (Postprocessing))
Then I found the Wavelet Decompose plugin, and the search was mostly over for me.
I thought it might be helpful to walk through the theory as I approach it for skin retouching/smoothing, and how Wavelet Decompose fits into my workflow.
The main point that I have noticed is that what most people mean by “smooth” skin really means, “smooth” tones. See, real skin has pores, wrinkles, blemishes, etc. In fact, it’s those pores and wrinkles that add “character” to skin. The lack of these features in skin will instantly cause an image to look unrealistic to most eyes.
I am very much of the opinion that any modification to skin tones be as transparent as possible - ie: they should not be obvious or immediately noticeable. I personally try to be as natural looking as I can (to my eye at least). Of course, this is a highly subjective thing, and one mans natural is another mans mannequin.
That is the problem with trying to use a gaussian blur on the base image to “smooth” the skin. You lose a ton of detail and end up with a smeared looking mess. All in an attempt to either smooth the tones of the skin, or to minimize the appearance of pores/wrinkles. Many times, both to some degree. If only there was some way to be able to modify the tones of the skin separately from the pores and wrinkles (and separate again from blemishes or freckles).
Oh, that’s right, I mentioned Wavelet Decompose earlier!
If you want to practice some of the things I will be talking about, Flickr user Erik Olsson has licensed both Hoodie and Martina as CC-BY-SA-NC. I’d recommend going to grab one of those images (because really, who doesn’t like looking at pretty Swedish girls?). The first image was graciously provided by Kelly Ealy for demonstration here, and was offered on this Model Mayhem practice thread.
What the WD filter plugin will do is to separate your layer into multiples layers with different sized details on each one and a final residual layer with all the rest of the information. Each of these layers is set to recombine using the Grain merge layer mode, meaning that each layer is added to the previous one to build back up to the final image. This means that we can suppress data at a certain scale level to keep it from contributing to our final reconstructed image.
This is basically frequency separation on your image.
If you’re not sure what that means, it might help to see it in action. We’ll use a 100% crop from Martina above:
Now, running Wavelet Decompose on the layer and leaving the default options the way they are, we get 6 new layers: Wavelet Scale 1-5 and a Wavelet Residual layer. Let’s take a look at each layer to see what we get:
This residual layer is what is left over after all of the detail scale layers have been removed. Notice that it represents the global contrast and colors in the image.
Wavelet scale 5 is the largest details layer in this example. From here on each of the subsequent scale levels down to 1 will only contain finer and finer details from the image on their own. Look carefully at her skin on her cheek here. You’ll notice that individual pores don’t really show up on this scale, but the overall skin tones show up more. If the skin is “blotchy” or uneven in tone, it will show up very noticeably on this scale. I have found often that this scale level will often impact the overall perception of smooth skin tones more than any other, and it is usually here that I will start my editing.
Wavelet scale 4 shows some more overall skin tones and texture with just a hint of the pores coming through. Between this scale level and scale 5 is where I do most of my work. Rarely do I need to modify any of the lower scales unless I am targeting specific blemishes.
Pores are beginning to really become obvious now at this scale. This would be the largest pores in her face, and this scale is the contributor for the largest size.
The mid-size of the pores are very clear at this scale. Finer features like wrinkles will also show up clearly on this layer.
It may be hard to see, but the finest details reside here. These are the smallest scale contributors to the pores and fine lines. Stray hairs will sometimes individually show up here as well. (You can make out her eyelashes very nicely in this scale level for instance).
What you want to remember is that each of the scale layers is set to Grain merge layer mode, meaning each layer will intensify with the layer below it, all building up down to the wavelet residual (which is in Normal blending mode). I mention this because if you wanted to remove features from one of the scale levels you can easily just set your foreground color to medium gray RGB(128,128,128), and anywhere you paint on a scale level will remove those details.
If you try this on your own, a good way to understand what is happening is to turn off all the layers in your image, then turn on each of the scale layers starting from the smallest (Wavelet scale 1), one at a time. This way you will be able to see what the contribution of each layer is to the final result.
Retouching skin (in practice)
So, how can we use this information to help us retouch our images? Well, there are a couple of things to keep in mind before getting started…
The number of scales you use will be dependent on your image dimension size, and the relative size of features in it. I don’t have any rules to help you decide this, but increasing the number of scales will give you a larger number of smaller frequency separations to work with. If you’re just starting out I recommend staying with the default of 5 scales until you are comfortable with this technique.
I personally try to use as light a hand as possible, to avoid destroying too much detail in the skin. A good rule of thumb is, if it looks right to you, then it’s too much - make it more subtle.
So, using the Martina image from above, I will open the image in GIMP, and run:
Filters → Generic → Wavelet decompose…
Leaving all of the defaults will leave me with 5 wavelet scales and a residual.
Remember you can use Shift-click on a layers visibility to isolate just that layer to view.
I will often do this with the residual and scale 5 layer to get a feel for what types of objects lie in those frequencies visually.
Now I will leave all the layers visible, and will begin using the Free Select Tool to begin selecting a portion of the face that I want to adjust. I will usually try to keep similar-sized features together, and will also try to follow the contours of the face and light. Once selected, I will also feather the selection by a good sized radius (around 30px radius in this example).
Once I have a region selected, I will then activate the highest Wavelet scale I have (5 in this case), and will try applying a gaussian blur to that layer. Choice of a blur radius is arbitrary, but I’ll usually try to blur enough to smooth out the tones on this layer, but not to completely obliterate them. I finally chose 33px in this example. Keep in mind that subsequent scales will also be blurred, and the effect is additive to the final image.
Now with the same selection still, I will activate the next Wavelet scale layer down (4 for me), and will apply another Gaussian blur here as well. I generally tend to aim for approximately 1/2 - 1/4 of the previous blur radius. I finally decided on a 13px radius here.
The thing to notice when working on these largest scales first is that the underlying tones of the skin will begin evening out. If there is blotchiness, liver spots, sun damage, etc. those features can be softened or removed without affecting smaller features like pores as much. If this were me, I would stop here and begin pixel-level dodging and burning to clean up other things to my liking.
But, since we are learning, let’s keep going and try blurring features on Wavelet scale 3 to see the effect.
If we used an even bigger radius on Wavelet scale 3, the effects get a little jarring:
This is what I mean when I say a light touch is really best. The 16px blur on Wavelet scale 3 blew us right past nice, neutral retouching into mannequin territory (and I don’t want to have to link another mannequin image).
What’s nice about using Wavelet Decompose is that on each of the scale layers, a neutral gray (128, 128, 128) color will suppress that feature at that scale level (effectively removing it). This means that you can grab a brush with gray, and selectively paint over blemishes or features that you want to suppress. Instead of using a blur, I could have used a brush with gray, and painted on her skin at each level with varying opacity to suppress those features.
This gives you pixel-level control of features directly with a simple brush, and the fact that the layers recombine with Grain merge layer modes means that you can see the results of what you are doing immediately on the image.
Once I am happy with a region of skin, I will then select a new region to begin working on, and will follow the same steps outlined above to get a result that I like. I like to break up a face into different areas based on the light and skin features. For instance, I will usually work on cheeks and just below the eyes separately from the nose, chin, and forehead. It’s really a personal preference rather than a rule, though.
Remember to zoom out and get a look/feel for the result from afar - sometimes you can get too zoomed into a region and not realize what is going on.
I’ve included the .xcf file with my selection still active from the examples above. It already has the gaussian blurs on scale 4 and 5 done (but not 3).
Download the GIMP .xcf.bz2 file of the example (2MB).
(Just save it and open it directly with GIMP)
Hopefully this has been helpful to some of you out there. With a little perseverance we can eliminate the use of globular gaussian blurs over entire images as a technique for mangling skin. This is a very powerful method of image manipulation and does have other uses as well - did anyone notice that Wavelet scale 1 is a really nice high-pass layer for your image? Bet you could use it for some nice sharpening if you wanted! ;)
Experimentation is key here! Don’t be afraid to try things out!
Questions or feedback? Let’s here about it in the comments.