Perhaps you are shooting products for a catalog against a crumpled background that nothing can save, or you need to move the model into an atmospheric fantasy universe — in any case, the background needs to be changed. All beginners face this sooner or later.
What are the ways to cut out the background? What is the fastest way to do it? Is it possible to perfectly remove the background the first time and, if not, how to refine the picture? We answered these questions and put together a complete guide for you on how to get rid of the background in Adobe Photoshop.
How to cut out a background in Photoshop using a mask
The mask is a stencil with which you can adjust the opacity of individual parts of the layer. You decide what will be visible in the image.
The advantage of the mask is that it does not erase pixels like an eraser, but hides them, as if covering them with an invisibility cloak. It turns out that the picture under the mask remains the same as it was, we just do not see it.
The mask is worked with the Brush tool (hot key B, that is, Brush). To draw on a mask, only two colors are used — black and white.
One thing is important: black hides the image, and white shows the visibility of the layer.
To remove the background in Photoshop using a mask, you need:
1. Select the layer from which you plan to erase the background.
2. Add a mask to it. A white mask will automatically be added — that’s what we need.
3. Select a black brush and erase the excess, avoiding hitting the model.
Away from the model, use large brushes to work faster. The closer to the object you want to leave without a background, the smaller the brush. Also adjust the brush feathering parameter — too soft edges will give an unnatural result, will make the model translucent, and too sharp will make the picture look like a rough-cut scissors photo with torn edges from a glossy magazine.
4. After you remove the background using the mask, any movement of the layer must be done with it. Luckily, the mask is automatically attached to the layer, so no extra effort is required. Also, the mask cannot be removed, otherwise all your work will be lost.
5. If you accidentally erased too much — it doesn’t matter. Change the black color to white and return the lost area (the fastest way to swap colors in places is with the X hotkey).
To work faster, and your hand does not get tired, use a graphics tablet. For convenient work, the simplest and cheapest option is suitable.
Remove background feature in Photoshop
Starting with CC Photoshop 2020, the program has a Remove Background feature. The developers have implemented the Adobe Sensei neural network, which itself calculates where the object is and where the background is, and removes only the background.
- You open the file.
- Remove the lock from the layer by clicking on it. It blocks the ability to erase pixels from the layer, which defeats our purpose.
- Open the Properties palette. If it’s not in your workspace, look for it in the top command line on the Window tab.
- Click the Remove background button.
For some time the program will execute the command — this process is not lightning fast even on powerful computers, so you have to wait a bit.
As a result, you will get a layer where the background is hidden under a black mask. The program adds the mask automatically so that in case of an error you can manually refine the result and make it more accurate.
The more the object differs from the background in color and brightness, the more accurate the selection will be. If the model and the object merge with the background, then the program will inevitably skip a piece of the background, or hook the object itself, as in this case. This result needs to be improved.
If you have an older program, then there is no way to implement this function — you will have to switch to new versions of Photoshop.
How to remove the background with a selection
The selection tools help you select an object or background so that you can then cut it out, or adjust the selected part of the image. For example, isolate a piece of the background to change the color or brightness of the sky.
- Choose any selection tool. Magnetic Lasso or Quick Selection works best. They stick to the object along the contrast border — the difference between objects in color or brightness.
- Outline the object. The magnetic lasso outlines the outline itself, but if you use Quick Selection, then you need to select a brush with a plus drawn next to it and indicate the areas you want to select yourself.
If the Quick Selection captures a piece of the background, take a brush with a minus drawn next to it and exclude unnecessary pixels from the selection. Watch the size of the brush — the larger it is, the larger pieces the tool captures and works less accurately.
- At the top, on the tool options panel, select Selection and Mask. There you can turn the selection into a layer with a mask, or simply remove extra pixels by erasing the background.
- To do this, scroll the panel on the right to the very bottom, find Output to and select New Layer or New Layer with Layer Mask. In the first case, you will get an object without a background, in the second — everything is the same, but the background will not be removed, but hidden under a mask. This option is better, because this way you can change the result.
Finalization of the selection
Often Photoshop creates a selection not perfectly accurate — somewhere it captures an extra piece, somewhere the edges between the object and the background turn out to be too sharp and torn. You can automate the process as much as possible, trusting the tools, and then modify it manually — this will save time and ensure maximum quality.
Quick mask mode
- Click on the rectangle below the color swatches in the panel on the right (or hotkey Q). The selection will temporarily disappear, and part of the image will turn red. This is a quick mask mode that allows you to make selections more precise with a regular brush, as if you were working on a layer with a mask.
- Adjust the brush settings as you would with a mask. Keep track of shading, size, and also what color you are working with — black or white.
- When you’re done, press Q again or on the rectangle below the palette. The quick mask will turn into a selection that you’ve fine-tuned by hand.
Edge Detection and Global Refinement in Selection and Mask
- By increasing the radius in Edge Detection, make the selection more accurate, especially where there is hair, fur, fleecy surfaces. Note that if the radius is too large, there is a risk that the tool will erase part of the object. In this case, the inaccuracies that have appeared must be finalized manually.
If Edge Detect doesn’t help, use the Refine Edge brush. The principle of operation is similar, only here you can manually control the entire process of selecting complex areas.
- The global refinement works with the path. We can make it smoother by feathering, smoothing, increasing edge contrast, or narrowing/expanding the selection evenly.
How to cut out the background with the Color Range and Magic Wand tools
A solid background can be cut out using the Color Range tool or the Magic Wand tool. Their principle of operation is similar — they find and select pixels of a certain color.
Magic Wand Tool in Photoshop
- Choose a tool and point to the background on the image.
- The program will create a selection based on the color you specified.
To make the spread of shades larger and the program does not highlight the color of a random pixel on the background, set the Sample size to 3x3 or 5x5, and also increase the Tolerance parameter. The higher it is, the more shades of color the tool captures.
If you click the Select Adjacent Pixels Only button, the tool will only select areas that continue in color with the one you selected. If this button is not pressed, the Magic Wand selects all parts of the picture where this color occurs. For example, if you want to cut out a red background and the model has red lips, the tool will select both the background and the lips. It is inconvenient if you need to remove the background, and not all the red color from the picture.
- Finish the resulting selection with a Quick Mask or Select and Mask and convert it to a regular layer or a layer with a mask.
Color Range Tool in Photoshop
- Go to Selection and choose a Color Range.
- Click on Select and find the background color.
3. Click OK, and finalize the resulting selection, convert it to a mask or a layer with pixels using Selection and Mask.
Which way is more convenient and better? The one that is more convenient and understandable for you. In Photoshop, the same operation, as a rule, can be performed using several equivalent algorithms.
- Drawing a mask by hand and using it to cut out the background is a high-quality and most controlled way. But, as a rule, it takes longer than the rest.
- You can speed up the removal of the background by selecting it in any way that the Photoshop tools offer (Lasso, Quick Selection, Color Range, Magic Wand, etc.). But keep in mind that it will not work out perfectly — you need to refine it. Quick Mask or Select and Mask will help you with this.
- The Remove background feature saves time, but neural network flaws will have to be corrected manually.
- The more contrast the object is in relation to the background, the easier and faster it will be to cut out the background using automatic methods.
With these methods, you can cut out not only the background, but also any other object from the photo.