Removing stray hair using Surface Blur

You took that great portrait that you are proud of but noticed when you imported your photos to your computer that you have a lot of stray unwanted hair you need to remove. You tried the eraser, the spot healing brush, and the clone stamp tools in Photoshop but those won't work well for you... What to do?

Well , with solid backgrounds you can use the Clone Stamp tool with no difficulties at all to remove unwanted stray hair. Adding a layer mask will help further blend in the job. But if the background is not solid and you have degradations of color tones due to inconsistent lighting, you have to find another way to do it without introducing smudges and color shifts between the hair rim and the background.

Well let's explore blurring filters and build on the idea of blurring to remove unwanted hair. What blurring does is that it will look at the pixel value of the hair and replace it with another color value from the background. 

Let's try first Gaussian Blur, set the pixels to around 9. If we increase the pixels to blend in the hair with the background, the problem is that the wanted hair starts to disappear as well. So we need another blurring tool. For that purpose, let's try the Surface Blur. 

1. Duplicate the layer

To work non-destructively, first thing to do is to duplicate the layer. Hit Ctrl + J (on PC) or Cmd +J (on Mac).

2. Apply Surface Blur

Go to Menu - Filter - Blur - Surface Blur. Surface blur works until a surface reaches a color or contrast edge point., it will stop the blur there and it won't actually blur beyond it. The sensitivity is controlled by the Threshold field so if you crank this field up the blur becomes more forgiving on the edges. If you lower the Threshold, it becomes strict in terms of edges it will detect.

Experiment with the Radius and the Threshold while keeping an eye on the preview dialog and the canvas. Once you notice that unwanted hair is removed while wanted hair remains, this is when you know you need to stop. Typically a Radius between 10 and 30 is quite satisfying. The idea is to tweak the radius and threshold just before you introduce fringes of hair color.

Threshold depends on you portraits hair color and image resolution. Start with around 5 to 10 and experiment from there downward or upward using the slider.

Click OK. Now, depending on your computer speed and memory, the Surface Blur might take some time to process. 

3. Finish off with a clone stamp or spot healing brush

Grab a Clone Stamp tool or a Spot Healing Brush and finish off by painting over those tiny stray hair leftovers. If you are using the Clone Stamp tool, try to sample very close in order not to shift the colors of the background.

We are  not done yet, but soon we will :)

4. Mask and reveal

Then we create a black layer mask to hide everything. We are going to reveal only the areas we want on the layer. So go to the option bar and make sure you "Sample all Layers", grab a white brush tool with 100% Opacity but soft edges. Start painting over the areas (stray hair) you don't want. By doing so, you are actually revealing the Surface Blur effect.

5. Conclusion

There are many ways to remove stray hair but I found this to work well on portraits with low clutter in the background but where lighting is not even to produce a solid background color. For outdoor portraits with many things happening in the background, this technique might not work properly. But, why not try it and get back to me with your feedback?