Luminosity vs. Frequency
This article is based on a thread that I saw over at ModelMayhem: http://www.modelmayhem.com/po.php?thread_id=910112
In retouching and compositing one task that needs to be done fairly often is masking things and creating selections.
Hopefully this will help you understand the process a little better and make it easier for you to quickly select areas that would be hard to select with other methods.
Let’s assume you have a situation similar to the one in the thread I linked above. I’ve somewhat exaggerated the problem with a generic image to make it easier for you to see the problem.
This is your original image:
Your job is to make the hair less visible so they don’t attract as much attention from the image.
Your first idea might be to lighten the darker hairs in order to make them match with the surrounding „skin“ texture (it’s a noise pattern, but you’ll see why I used this soon ;-)). To save yourself the time to manually dodge & burn each of them you have multiple options:
Applying a Gaussian Blur:
To remove all the hairs I had to apply a blur radius of 20 px which also destroyed all of the surrounding texture so this might not be acceptable depending on your output size.
Applying a Dust & Scratches in „Lighten“ mode:
To remove all the hairs I used a radius of 8 px and a threshold of 4. Looks better than the Gaussian Blur, but if you look closely you can see that the hairs are now a block of color without any texture information, so this again might not be the best idea.
So what do you need to do? If you inspect the hairs closely you’ll notice that they darken the underlying texture but don’t remove it. So your best bet is to select them and apply a lighting curve to it.
And this is what this article is all about (sorry for the long intro *g*).
Usually when people create a mask they look into the channels and find the channel with the greatest contrast between the object they want to select and the background. However in this case you’ll notice that in all of the channels the hairs on the upper part of the arm are brighter than the hairs on the lower part. This means we need to do multiple passes to get all of them.
However what you’ll also notice is that there is one thing that is even more obvious and that is the only reason why the hairs distracted you in the first place: They are distinctly darker than their surroundings.
To exploit this, we can apply a little used filter, the „Filter“-„Other“-„Maximum“. This will expand the lighter areas of the image over the darker areas.
I applied a radius of 3 px here to cover all of the hair.
Now we need to find out where the original hair was and the easiest way to find the difference between two images is: The difference blend mode :-).
Looking good so far :).
Now we can either select the RGB luminosity or find the maximum value of all the RGB channels by applying each of them to another in „Lighten“ mode. In this case both methods work fine, but I have an action for the maximum channel, so I used this.
To further enhance the selection you can now apply curves to the alpha channel (0/8 and 255/45 works good).
Now apply this as a layer mask to a new curves adj. layer and push the middle of the curve up until the hairs vanish.
Be careful though because some parts might get too bright while others are still too dark. Try not to create any glowing parts, we’ll fix the rest in a minute.
To fix the remaining darker hairs, apply yet another curves adj. layer to the one you just created and create a clipping mask between the two.
In the new curves adj. layer you can now lighten the quarter and three-quarter tones and fix the midtones to make them less visible.
Next I also noticed that some of the removed hairs left a reddish glow, so I pulled down the red curve a little bit to compensate for this.
I think this looks pretty decent for starters :).
Of course you can play around with this a little more, reduce the opacity, refine the mask, clone out any areas that you still don’t like etc.
Hopefully this article will help you with your masking in the future and remember that sometimes the easiest mask comes from the difference between an object and its surroundings, not necessarily from the overall luminosity.
I’ve uploaded my PSD-file as well as the RGB_MAX/RGB_MIN action for you here:
Atn-file: RGB_MIN – RGB_MAX.atn (if the download doesn’t work, right click on it and use „Save as“)
PSD-file: Hairy situation.psd