Use Photoshop to separate hair from white background

My favorite way to add a new background while maintaining details in the hair

Before we get into it, this technique is really specific to certain images. First, it works best with a completely (0% K) white background. You can use it on something darker, but you'll have to fuss around with it more and it might not be worth your time. Second, it works best when the background you want to add in is lighter and not overly saturated.

I developed this technique while working with apparel mockups for Wine Winks. The apparel manufacturer supplies images, but they're on a white background. Boring. We wanted to spice things up without looking too computer generated, and this is the result.

1. Open your image in Photoshop. Duplicate the base layer. This is the layer we'll be working on.

2. Use the Magnetic Lasso tool to select your model (shortcut: L, or shift+L until you get to it). Be sure to grab the whispy sections of hair.

Screen Shot 2017-12-22 at 4.29.04 PM.png

3. Refine your selection in Select and Mask (with your model selected, hit "M" on your keyboard, then click the button in the upper-middle that says "Select and Mask..."). Set your Global Refinements to something similar below, or mess with them until you get what you want. Here's why:

Smooth: The Magnetic Lasso tool can be a little choppy, so I like to set a low Smooth. This gives a more organic outline.

Feather: In real life, object outlines always blend in with their surroundings a bit. Hard edges are a dead giveaway for digitization. Just don't overdue it. I virtually always stay below 2%, but usually below 1%.

Shift Edge: Depending on the photography you're working with and the selection you got from your Magnetic Lasso, you might not need to do this. Test it out, though. In mine, the model consistently has a white glow around her outline from the studio lighting. I like to minimize this glow so her lighting blends in with the lighting of her digital surroundings better.

Screen Shot 2017-12-22 at 4.31.03 PM.png

4. Hit "OK" to exit Select and Mask. With your new selection, Copy and Paste in Place (Cmd+C, Cmd+Shift+V). Title this layer "Multiply".

5. Duplicate your Multiply layer (Cmd+J). Title this layer "Details". 

6. Set your Multiply layer blend mode to Multiply.

7. Underneath both layers, create a new layer (Cmd+Shift+N) and fill it with 50% grey (Shift+fn+F5). Now your setup should look like this:

Screen Shot 2017-12-22 at 4.31.33 PM.png

8. Add a layer mask to your Details layer. Using a 0% hardness brush, erase the sections with hair whisps. These details are now revealed in the Multiply later.

There will be a few areas where there's white background trapped between some chunks of hair. To remove these, combine a few different brush sizes (all 0% hardness) to remove the shape. Then go back with a small brush and erase the outermost pixels of the hair. 

While you're at it, use that small brush to erase the outermost few pixels of entire hair outline. This makes a really nice blend from the Detail layer to the Multiply layer, and ultimately to the background layer we'll add later on. 

Here's what it'll look like:

 

Screen Shot 2017-12-22 at 4.33.47 PM.png

9. You're ready to add the background! Add this underneath the Detail and Multiply layer, on top of the 50% grey layer. This works best with lighter grey backgrounds, but you can experiment with others. Here's what it looks like with our current model (apologies for pixelization):

Screen Shot 2017-12-22 at 4.38.25 PM.png

10. Add some shadows on a new layer to make it more lifelike. Here's another example of an image with this treatment and shadows: 

Screen Shot 2017-12-28 at 11.16.39 AM.png