Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Sign in to follow this  
Rss Bot

How to remove a background in Photoshop

Recommended Posts

If you’re new Photoshop, knowing where to start when it comes to removing a background can be daunting. Photoshop has many different ways you can achieve this, some faster than others, some a little more time consuming and complex. There's no right or wrong way, it’s about picking the right approach for the job in hand.

In this Photoshop tutorial, we'll cover some techniques you can use to remove a background, each using different tools. We'll start with two of the most basic approaches: the Magic Wand tool (this page) and Quick Selection tool (jump to page 2). Then we'll move on to the more complex method of using channels alongside the Refine Edge tool (page 3). Finally, we'll look at using removing backgrounds using the Pen tool, paths and masks (page 4). Let's get started...

Use the icon in the top right of each image to enlarge it

The Magic Wand tool

The Magic Wand tool is perhaps the quickest and simplest way to remove a background in Photoshop, provided your image has clearly defined edges. It works best when there is a good amount of contrast between your background and foreground and when one of these elements is a solid flat colour.

01. Start with a basic selection

Screenshot of building with background removed in Photoshop

The magic wand tool is the quickest way to remove a flat background in Photoshop

Open your image and duplicate it, before hiding the background layer. This provides an easy way of referring back to the original image should you need to. With the new layer selected, select the Magic Wand Tool from your Tool panel (Shortcut W and shift+W to toggle between tools), select the flatter area of the image and delete.

02. Adjust Tolerance levels

The Magic Wand can be quite limiting as a tool for removing a background, but by making adjustments to the Tolerance of an image you can select and remove a slightly trickier background providing the part you want to cut out still has clearly defined edges. 

You use the Tolerance settings (found in the Options bar) to adjust the range of colour values you want to select at once: increase the value and it will select a wider range of colours, decrease the value and it will select a narrower range. 

Screenshot of a chair with background removed in Photoshop

By decreasing the tolerance the magic wand tool will selects less colours values

For images like the one above where the foreground object and background are a similar colour, you need to reduce tolerance levels so the Magic Wand tool recognises the background as a separate colour. Here, the tolerance has been reduced to seven. Then you can use the Magic Wand tool and the shift key to select different areas of background until you have the majority of it.

Screenshot of mountains in Photoshop with the background removed/selected

By increasing the tolerance the magic wand tool will selects more colour values

Alternatively, in an image where there are lots of different colours in the background, but a clear contrast between the colours in the foreground and background, you need to increase the tolerance levels. 

For example, in this image of dark mountains against an orange sunset, tolerance has been increased to 120. Again, select a small portion of the background using the Magic Wand tool, and then shift-click any other unselected areas of sky until all of it has been selected.

03. Neaten things up with Layer Masks

Screenshot of white chair with background removed in Photoshop

Creating a Layer Mask gives you more control over editing your image

The Magic Wand tool is great for a quick cutout, but the downside is that it doesn’t leave you with the cleanest of edges. Plus if you’re doing a multiple selection, this technique can also leave you with stray pixels in the background. But there are couple tricks you can use to improve on both these things. 

For this example, we'll got back to the chair image. You've already selected as much of the background as possible using the Magic Wand tool, with tolerance set to seven. Once you're happy with the background selection, instead of deleting it, create a mask.  

First you need to invert your selection. Select Inverse (under the Select menu, or shortcut cmd+shift+I) and then select the Add Layer Mask button (see image) found at the bottom of the Layer panel.

04. Use Layers to pick up stray pixels

Using a mask when editing your image means you have more control as it is non-destructive. This means pixels are not deleted, just hidden, so you can re‑edit the masks by removing or repainting in parts of the original image. 

To see clearly how neat your edges are, create a new layer using the New Layer button at the bottom of the Layers panel. Fill this layer with a solid, bright colour and place it below your mask layer. If you zoom in, you can see the limitations of the Magic Wand tool; it can leave edges very jagged and litter your image with stray pixels.

05. Tidy things up with the Brush tool 

Screenshot of a silhouette of a chair in Photoshop

Remember, when using masks black hides, white reveals

Layer Masks allow you to clean up and finesse your image. In this instance, the first thing to do is get rid of any stray background pixels that were not selected with the Magic Wand tool.

Do this by alt-clicking on the Layer Mask thumbnail in your Layer panel. This will convert your artboard to the black and white Layer Mask view. Set the foreground colour to black, select a Paintbrush tool and start filling in those stray pixels and tidying up the edges of your image. Use the [   ]  keys to decrease or increase the brush size to cover larger or smaller areas of your artboard. 

06. Finesse your Layer Mask

Screenshot of a white chair on a pink background in Photoshop

Experiment with the tolerance in different areas of your image to get the correct selection

Click back on the background image to exit the Layer Mask view, then reselect your Layer Mask thumbnail to make it active. Take some time to use the Brush tool to tidy up your image and get rid of some of the harsh, jagged edges. 

In areas where you have more contrast in colour, like at the bottom of the chair, you can go back to your Magic Wand tool, up the tolerance value and make a more defined selection, then apply this to your Layer Mask.

Next page: Create cutouts using the Quick Selection and Refine Edge tools

Another useful tool for really speedy cutouts is the Quick Selection tool. It works in a similar way to the Magic Wand tool, but rather than just selecting similar colours, it also selects similar textures and detects the edges of objects. 

01. Create a selection

Screenshot of a man with no background in Photoshop

The Quick Selection Tool is a great way of doing a quick cutout 

To use this approach, open your image, duplicate and hide the background layer. Select the Quick Selection tool from the Tools panel (Shortcut W and shift+W to toggle between tools). Click on your foreground object and drag. It's that simple. This tool tends to work best if you start in the centre of the object you wish to cut out and drag outwards. 

If you find you've selected parts of the image you don’t want to be included in your cutout, hold down alt to remove these from your selection. Use the [   ]  keys to decrease or increase the brush size to control how much is being selected by the Quick Selection tool.

02. Soften the cutout edges

Screenshot of a man with his back to camera in Photoshop

Adding a feather can help your image sit better in its new background

Let's say we want to add a new background to the image above. You might find that when you add the background, your cutout has a slight halo (fringing) effect around the edges. However, you can easily edit this. 

Select the cutout by cmd+clicking on the layer mask thumbnail. While the selection is active, go to Select menu > Modify > Contract. Enter a value in the Contact Selection box to trim off the edge of your image (one pixel is a good place to start). 

Next add a feature via Select > Modify. Invert your selection, then making sure you still have the Layer Mask thumbnail selected, delete. Your cutout now should have a much softer edge that looks more natural on the new background.

Next page: How to create cutouts using channels

Channels are great for images that contain fine detail such hair, fur and foliage. Like the other techniques we've explored so far, this process works best when you're working with an image that has a solid background and clear contrast between the foreground and background elements. 

 01. Work with channels

Screenshot of the levels feature being used to cut out trees in Photoshop

Channels can be really effective for cutting out finer details

Open your image and navigate to the Channel panel (Windows > Channels). View each of the channels, then select and duplicate the channel with the most contrast. With the duplicate channel selected, open your levels (cmd+L) and adjust to up the contrast.

02. Clean up with the Dodge and Burn tools

Screenshot of a palm tree with a gradient background in Photoshop

The Dodge and Burn tool can help refine the contrast of a channel-based cutout

Use the Dodge and Burn tools to clean up any areas that aren't solid black or white. Set the exposure to 100 and use the Dodge tool to paint out any areas you want to lighten. Experiment with using the different ranges until you're happy with the results. 

Use the Burn tool for the opposite purpose: to darken any areas that need it. When you're happy, cmd+click your channel thumbnail to make a selection. Open your Layer panel and create a mask. Hit shift+cmd+I to invert your selection and add a Layer Mask.

03. Try the Refine Edge tool

Screenshot of horse's face in Photoshop

The Refine Edge tool is really effectively for cutting out hair and fur

The Refine Edge tool can be really useful when cutting out images with finer details – it works really effectively with hair and fur. To use the tool, open your image and duplicate the background layer. Use any tool to do a rough cutout of the foreground image (we used the Quick Selection tool). At this stage don’t worry too much about the finer detail of the hair. 

With the selection active, open the Refine Edge tool in your Control panel. Increase the edge detection until some of the finer detail of the hair is visible.

04. Restore detail

Screenshot of horse's face in Photoshop

Use the Erase refinement tool to increase the finer detail of your cutout

To get some of the finer hair detail back into your image, check the Smart Radius checkbox and make sure you have the Refine Radius Tool selected. Then start to paint over the edges of your selection where the detail is missing. 

If you want to remove detail, switch over to the Erase Refinement tool. You can use the additional Adjust Edge option to fine-tune your selection. If you get too much of your original background showing through, use the Shift Edge tool to contrast your selection. 

When you're happy with the changes you’ve made, choose to output to Layer mask. Now you'll be able to edit your image further.

Next page: Creating cutouts using the Pen tool

All the tools and techniques mentioned up to this point have their places and can be very effective for removing a background in Photoshop. But if you want to really up your game and have ultimate control over your cutout, you need to master the Pen tool. Although this approach can be a lot more labour-intensive, with a bit of time and practice, using the Pen tool will become second nature.

01. Draw a path

Screenshot of the Pen tool in Photoshop in action

Reading up on Bézier curves can really help you understand how the Pen tool works

Open your image and repeat the process of duplicating and hiding your background layer. Select the Pen tool (shortcut P) from the Tools panel. Chose a point on the edge of the foreground object, and start drawing your path.

If you're new to the Pen tool, you may find you get a very angular path that doesn’t mirror the shape of what you’re trying to cut out. To create curves in your path, as you add an anchor point, hold down the mouse key, click and then drag. 

This creates adjustment handles either side of the anchor point. By holding and dragging these in different directions you can adjust and control the shape of the curve. If you get to a point where you have a curved edge that need to a straight point, alt+click on the anchor point to remove the handle on one side. 

02. Save a Path

Screenshot of save path dialogue box in Photoshop

The path you draw will automatically appear in the Path panel 

Once you’ve completely drawn around your foreground item, you need to close the path. Do this by clicking on your first anchor point. You will see a small circle appear next to the cursor to show you the point is selected; click and the path is closed. Your path will automatically appear in the Paths Panel found under Window > Paths. Double-click on the Work Path to name and save the path. 

03. Edit a path

Screenshot of an edited path around an object in Photoshop

Paths can be easily edited, so don’t need to be too precise to start with 

The great thing about creating paths is that they don’t need to be perfect right away – you can easily go back and edit the path by selecting the anchor points with the Direct Select tool. Once you have anchor point selected (selected points will turn black), you can make adjustments to the handles to change the shape of the curve. 

Add points by selecting the Pen tool and clicking on the path, remove points by clicking on the anchor point with the Pen tool, and convert a curved point into a straight point (or vice versa) by alt+clicking

04. Convert a path to a mask

Screenshot of a layer mask around a chair in Photoshop

Using a bright contrasting background colour can help highlight any errors in your path

Now to convert the path to a Layer Mask. Do this by selecting the path in the Paths panel, and once it’s highlighted, hitting the Load Path as a Selection button at the bottom of the paths panel. 

Then, as before, open your Layers panel, select the duplicate background layer and hit the Add Layer Mask button. Create a new layer and add a bright, contrasting fill colour below your Layer Mask layer. Now you can check how your cutout looks.

05. Finesse your mask

Screenshot of Make selection dialogue box open in Photoshop

The size of your image will affect the amount of feathering you want to add

The great thing about creating a paths is that the information is there to use again. If the edges appear to harsh and don't reflect the original image, you may want to soften your cutout. 

To do this, duplicate the background layer and move it to the top of your Layers panel, making sure the layer is visible. Select your path in the Paths panel and hit ctrl+right-click. Select Make Selection from the flyout menu. Here you'll see an option to add a feather (I’m added a feather of two here). With the selection still highlighted, switch over to your Layer panel and add a Layer Mask. 

06. Merge techniques

Screenshot of merging layers in Photoshop

Merging techniques can really make the most of your cutouts

The final thing we're going to do is to create a better cutout of the cat's fur around its right ear. To do this, we'll use the Refine Edge tool we covered earlier. Duplicate the background layer and create a rough cutout of ear and fur in that area. With the selection active, open the Refine Edge tool in your control panel. 

Increase the Edge Detection until some of the finer detail of the fur is visible. Don't go too far, as this area of the image is really soft. Increase the level of detail using the Refine Radius tool. Once you're happy, you can select your two Layer Masks (ctrl+click) to merge the layers together.

Read more:

View the full article

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×