Learn how to remove the background in Photoshop by combining the use of multiple Photoshop tools. We’ll first use the Background Eraser (E) tool to remove the background and then we’ll use the Select & Mask in order to extract a woman from a background.
After that, we’ll extract hair from a complex background with lots of hair details and finishing it up using hair brushes & adding a new background.
Example 1: Removing Busy & Complex Background
I’m using this girl image and I opened in Photoshop by selecting File > Open. You can see in this image, the hair is difficult to extract because the background is not plain or solid or white, and thanks to flying away and stray hairs.
Make a Rough Selection
Now you need to make a rough selection of the subject either using Pen Tool or you can use the latest Select Subject feature to make a selection.
Just beside the Select Subject button, you’ll see a Select And Mask button click on that so we can refine the selection.
If you are using the Photoshop CS6 or CS5, then first you need to add a mask once you made the selection. Then right-click on the mask and select Refine Mask. Now you’ll have the same option which you are seeing in the below image.
Now you need to refine the selection which we just made. Once you click on the Select and Mask button, then use the Refine Edge Brush Tool to make some adjustments to the edges of the hair as they look too sharp right now. While this tool won’t work on this complicated background but at least it can make our task a bit easier by softening the edges of the hair.
Here you can see I used the Refine Edge Brush Tool to refine the hair on the right:
Here I used it on the left part of the hair:
Here I used on the bottom hairs:
Once you are happy with the results and scroll down to output settings (on the right side) and use the New Layer with Mask to create a new layer with a mask.
Here we have original copy layer with new masking results:
Reap the Benefit of New Background
So, guys, we are extracting the girl for what? Obviously, we are going to add a different background behind her. Before we proceed further, just add your new background here.
If you add your final background here then it is going to much easy for you to deal with the hair as sometimes final background may help you hide a lot of mistakes. You will not waste your time on those areas which you don’t need to be.
So I added my new background behind her:
Use the Hair Brushes
So you can see we are almost done but we need to give the final touches to hair. For that, I am using hair brushes to paint back the stray and fly away hairs.
You can get these brushes once you subscribed to our newsletter only from this tutorial, don’t use the sidebar form otherwise you won’t get a link to download brushes.
Here you can see I created a new layer below the woman layer and then I used the hairbrush to paint the flyaway hair on the top.
Here I created a new layer on top of all layers and painted using another hairbrush:
So this time I painted over the woman and clearly, I need to erase some other areas to blend the hair. Go to Layer > Layer Mask > Reveal All to add a mask to hair layer and mask those unwanted parts using a black brush.
Results after masking:
Similarly, I painted more hairs using hair brushes. What I did I sampled the color from the model hair, then painted some more hairs where I think there should be. I vary the brush size and colors to paint hair. I ended up with the following results but you can do a lot better than me if you spend some more time.
Here you can see the how many brush strokes of hair’s brushes I used in order to replicate the hairs:
Example 2: Using Background Eraser Tool
Step 1 – Accessing Background Eraser Tool
This tool works by sampling the color from the image. Basically, it samples the colors to erase them and then it erases those pixels by matching them with the sampled color. Whenever you click on the image to erase its parts this is when it samples the colors to erase.
You can activate this tool by pressing (E) or alternatively you can hover to Toolbox and it is underneath the eraser tool.
Step 2 – Open the Image
Now open up an image which you’d like to remove the background from. I am using this woman portrait image and I just opened it in Photoshop by selecting File > Open.
Once you opened the image duplicate it by pressing CTRL + J so you’ll have a backup of your original in case anything goes wrong. Now you can hide the visibility of the original layer by clicking on the eye icon as we’ll use the duplicated one.
Step 3 – Using the Background Eraser Tool
Now we’ll set the tool for the use. Set the Sampling: Continuous that means it will sample the different colors whenever we click on the area of the image to erase it. You can see in our image we have many colors so that is why I selected it.
Set the Limit: Edges and Tolerance to 25-29%. Low tolerance value will limit the eraser near to the sampled color and vice versa.
You can also check the Protect Foreground Color option and this will tell the eraser tool to not to erase the foreground color pixels. You can also select a color from the image to protect it.
Step 4 – Start Removing the Background
With the given setting above start erasing the background by painting on the image. Make sure you are using a hard round brush with Lower Hardness around 68% so the edges of the hair extract out in a smooth manner.
You can set the hardness of the brush, right click on the anywhere while the Background Eraser is active and then use the slider to reduce the hardness. You can also vary the brush size as well.
Here you can see I used the tool on the right side:
Similarly, I used it on the left side of the image as well. Remember you can also sample the color from the model hair to protect it whenever you are close to hair. So, right now our hardest part has done which is hair and for remaining body parts you can use the Pen Tool (P).
Don’t worry about the hair glitches and some hair strands which we just lost we’ll fix them in a couple of steps.
Here I removed the background completely:
Step 5 – Fixing the Edges
The eraser tool has done most of our work but we can do a lot more to improve the image mostly the hairs. Now we’ll paint the hair to fix it using the Brush Tool.
Activate the Brush Tool (B). Using a soft round brush paint the hair strands like I did it below. Remember to create a new layer (CTRL + SHIFT + N) for hair and sample the color from the model hair by pressing ALT Key while the brush tool is active.
I used a soft round brush with brush size 1 to 3px for painting hairs with lower opacity, which you’ve already seen set to 52%, but you can increase or decrease the opacity of the brush depends on you how stronger or smoother the hair you want. If you have a tablet then it won’t take you long and if not then you can also use the mouse like I am using it.
Here how I painted the hair strands wherever I think there is needed to be:
Not only Brush Tool you can also use Smudge Tool and Clone Stamp Tool (S) to fix those hairs. Try to experiment with it.
I went one step ahead and I added a different background behind the woman and then I blurred it using Gaussian Blur filter. You can use other backgrounds as well just put the background layer under the woman layer.
Example 3: Using Select & Mask for Selections
Select Background using Quick Selection Tool
Download the image provided in the tutorial resource section and go to File > Open to open it in Photoshop. Make sure to you unlocked the background layer by double-clicking on it.
Go to Select > Select & Mask.
1. Select the Quick Selection Tool (W) and drag over the image to select the background. You can see I’ve selected half of the background that is turned into white.
2. You can add or subtract from the refinement area if needed by holding down ALT/OPTION and drag over the image parts that you don’t want to add to the selection.
I clicked on the right of the background to select all remaining parts. Here you can see I’ve selected the background:
Note: we are selecting the background here instead of subject. Because it is easier to select the background rather going after the subject details which is time-consuming and finicky.
Use Refine Edge Tool to Refine Edges
Now select the Refine Edge Tool (R), brush over the hair edges to refine them that we have missed while making the selection of background.
Use Brush Tool for Manual Clean Up
Sometimes the selection is not precise even if you have a clean background to cut out which is the case here.
You can notice some parts of the subject are being extracted and we don’t want that. In order to add them back, select the Brush Tool and hold down the ALT/OPTION, brush over the parts to add them.
I am using a hard brush for manual clean up. You can access the brush menu by right-clicking in the image to see the size and hardness of the brush. But make sure you’ve selected the Brush Tool before right-clicking.
Seeing the Selection
Head over to the View Mode and then select Black/White View.
As far as I can see my selection looks good. If you find some grey parts there what you can do is that select the Brush Tool and hold down the ALT/OPTION, brush over the parts to add them back.
Output the Results
In the end, we’ll output the selection in a mask. But before you do that, you can take a look the Global Refinement section to see if there is a further need to fix the edges of the selection. If so, feel free to play around with these.
In the Output Settings, I’m selecting Layer Mask to see the results on a same layer with layer mask attached to. Click OK to output the results.
Here are the results that you are going to get:
In order to see the subject, press CTRL + I to inverse the Layer Mask results.
Bingo! Here is the decent selection with transparent background:
Now I can add a new background behind the subject:
Fine-Tune Layer Mask
If you think that there is still a lot of possibilities to improve the selection, you can right-click on the mask and choose Select and Mask to refine the selection again and again.
Some More Examples