Adobe Photoshop allows us to remove the white background from our photos in many ways. If we adjust it well, we can add another background that matches our photography, thus making incredible and completely realistic photomontages.
To learn how to do it, you don’t need to know much about Photoshop or have any incredible skills. You just need a little patience and a willingness to learn. Do you dare to try it?
What is the Use of Removing the white Background of a Photograph?
The best thing about being able to remove the white background of a photograph is to be able to put any other . You can choose a solid color, such as white, black or gray, to simulate a photo in the studio, or you can dare with a photomontage, to place the person where you want, or to add an impressive sky to your landscape photography.
But for this to be realistic, you must learn to remove the background correctly, learn to cut that person or element without showing hard edges or edges. Only by getting a good selection will you be able to change the white background without it being noticed with the naked eye. Next we are going to see different ways to eliminate the background of your photographs.
Selections to Trim the white Background
To remove the white background of our photograph we are going to have to cut out the person or element that we want to isolate by means of a selection . Photoshop gives us different options to do so, and each of them will be better for us in one case or another.
With the guidelines that I will give you now and, above all, with the experience that you acquire, you will know how to differentiate beforehand when viewing a photograph which type of selection suits you at all times.
Before looking at each selection, we are going to see a couple of common options that all the selections have, and that will come in handy to cut exactly the area that we want:
- First of all, it is very important to know that you can add or subtract zones to any initial selection to cut out exactly what you want. This will work for you with any of the selections available in Photoshop, and you can even combine them with each other to get the most accurate selection possible.
- Add selection: Press Shift while clicking on the area you want to add to your selection. You can also do it by selecting the icon and selection in the toolbar that appears at the top every time you choose a selection tool.
- Subtract selection: Press Alt while clicking on the area you want to remove from your selection. You can also do it by selecting the iron subtract-selection in the toolbar that appears at the top every time you choose a selection tool.
- Second, there are times that, even if we want to select an element, it will be easier for us to select the white background or vice versa. That is why it is interesting that you know that you can invert any selection at any time from the Selection / Invert menu , to select the opposite of what is currently selected. This option will make your work easier, since you can choose what will be easier to select, and reverse the selection later.
Now that you know these two basic options applicable to any selection, let’s see which types are going to be better for us to eliminate the white background of a photograph.
1. Magic Wand
The Magic Wand Tool Magic wand will select all pixels in the photo that have a similar color. You just have to click on the area you want to select, and Photoshop will calculate the selection. You can make it take more or less tones by raising or lowering the Tolerance level . Next to tolerance we will find 3 options that will give us more versatility to the tool:
- Smooth: It is convenient to have this option activated, since it will smooth the selection to avoid strange edges and edges. However, if you ever find that the edge doesn’t fit well, you can try turning it off to see if it’s interfering.
- Contiguous: Depending on the photograph, it will be useful to activate or deactivate this option. If we activate it, we will only select the pixels with similar color that are together. If we deactivate it, instead, all the pixels of the photograph with a similar color will be selected.
- Sample all layers: This option will help us when we are working with different layers in Photoshop, and we want to select something that is made up of all of them, which is not in a single specific layer. Thus, instead of having to flatten the layers to be able to select it, it will simply be enough that you select the one you are currently working on.
The drawback of this tool is that it requires that the white background and the element that we want to cut have very different colors , since if they have a similar tone the tool will be bundled between the two and it will be impossible for us to make a good selection.
2. Quick Selection
The Quick Selection tool Quick Selection It works in a similar way to the magic wand, but instead of looking only at color, it also analyzes the texture of the area to further refine the selection. So for selections where the wand is not working properly, the quick selection may do better.
If you can’t find the quick selection icon, I warn you that it is hidden inside the magic wand tool. Many of the tools on the left sidebar hide other tools that will appear if we keep the icon pressed. Thus, it will appear if you hold down the magic wand icon for a second.
First of all, we must choose a brush size in the upper bar that appears when we select this tool. We must also choose the hardness so that the resulting selection has harder or more diffuse edges. Then we also find next to the size of the brush two options, similar to the ones we found in the magic wand:
- Sample all layers: As I explained before, this option will allow you to select an area that is not in a specific layer, but is composed of several layers forming the same composition.
- Auto Enhance: This option is similar to the Smooth option on the wand. It is convenient to have it activated so that it improves the edges of the selection.
To select using this tool, click and drag the mouse over the area to be selected. Make short strokes so that the selection is created little by little, otherwise, it is possible that what you want is not selected correctly. You can also play with the size of the brush to refine the selection in more delicate areas.
3. Lasso Tool
The Lasso Tool ribbon will not serve us in itself to cut out the person in the white background, since it is very imprecise, whether you use it freehand or if you use its Polygonal Lasso variant loop-polygonal, which allows you to make points.
However, it will come in handy to eliminate or add certain elements that have remained inside or outside the selection, if with the other tools we cannot rush it enough. I have already explained to you before how to add and subtract parts of the selection, and this is the good thing about Photoshop’s selection tools, which you can combine with each other to add or subtract whatever you want.
On the other hand, it should be noted that this tool can come in handy to cut out certain elements if, for example, the object that we want to cut from the white background has a polygonal shape, such as a building or a box.
4. Pen Tool
The Pen Tool feather It is the most accurate selection of all, but also the most tedious. Unlike the wand or the quick selection, which work semi-automatically, with the pen tool we ourselves will have to work through the entire selection. A priori, the pen will not draw a selection itself, but a path. When we complete it, it will be when we tell Photoshop that we want to convert that path into a selection.
To start making a path with this tool, select the pen and click on a point, where you want to start making your selection. If you click on another nearby point, you will see that a straight line will be created that connects them. So what is the difference between the feather and the polygonal lasso? Well, we can make that straight line turn into a curve with the shape we want, in two different ways:
- If when you click, instead of clicking, you click and without releasing you drag it, the anchor points or handles will appear to be able to make it curve, and directly depending on in which direction you drag the curve will become more or less pronounced.
- If you have a point without handles, because you haven’t dragged when clicking, you can always make them appear by clicking on it with the Convert Anchor Point tool convert-anchor-point, which is hidden inside the pen tool. To make it appear, press the pen tool in the side toolbar for a second.
These anchor points or handles work as follows: one controls the curve before the point, and the other the curve after it . Moving them you should adjust the curve to the edge of the person or element you want to cut out.
Thus, this tool consists of creating a path that perfectly surrounds the element to be cut, always trying to create the minimum possible points. The fewer points and more curves you make, the fewer edges you will have in the selection and you will get a more natural and realistic cut.
Remember that if you make a path within another already closed path, you will create a hole in the selection, so as not to select the white background in certain closed areas, such as an arm placed in the jug position.
When you have the complete and closed path, go to the Paths tab that is in the Layers window. If it does not appear, go to the Window / Paths menu and you will have it there. Here you will see a layer with the path you just made. Right-click on it and choose the Make selection option
When we click on this option, another window will appear with different options:
- Fade radius: It will make the edge a little more diffuse so that the cutout is not so hard. It is convenient to give it 1 or 2 pixels of fading (always depending on the size of the photograph), so that the cutout is more realistic if we are going to integrate it later into another white background.
- Anti-aliasing: As with the other selections, the anti-alias option will make the border of the selection edgeless and slightly smooth.
- Operation: Normally we should leave it in New Selection, and if we do not have an active selection, it will only let us choose this option. If we had another active selection, it would allow us to make the path be added or subtracted from that selection, or cut it forming an intersection.
When we click OK, we will finally have our selection, perfectly adjusted to the edge of the element to cut. As I mentioned, it is a tedious process, but if we take the time to adjust the path perfectly, we can achieve very realistic cutouts, even in photographs with very complex white backgrounds.
The Incredible Use of Masks Masks is one of the most powerful options in Photoshop, along with layers. A mask will allow us to hide part of our photograph without erasing it, so we will always be able to recover that hidden area or some part of this area. In addition, after creating it we will be able to modify the hardness of the cutout so that it is not so hard and is much more natural and realistic.
Remember that when we mask a layer and there is no other layer behind it, the part without a white background will show up as a lattice of gray and white squares. This does not mean that our background is like this, but that it is an empty, transparent area. When we put a layer behind it, it will show through those empty areas.
To create a mask we have to first make a selection, as I have taught you in the previous points. Then, press the Add layer mask button that you will find below the layers window, or go to the menu Layer / Layer mask / Discover selection (or show selection, depending on whether what you want is that the selected disappears or is what only visible).
When you do this, a black and white image will appear associated with the layer that shows the clipping. The black part is the hidden area of the photo, and the white part is the area that is being displayed. If you press Control (or Cmd on Mac) + I while you are selecting this mask, the colors will be inverted so that what is hidden is shown and what is shown is hidden, in case you have made the selection the other way around.
The nice thing about masks is that you can always take a brush and paint in black or white to hide or show any area. If you delete it in the usual way, you will have lost it and it will be more difficult to recover it.
On the other hand, another advantage of masks is that we can make the edge of the clipping harder or more diffuse from the mask options, and we can also modify it when and how we want. To show the mask options, double click on it and the following panel will be displayed.
In the mask options panel we can find different interesting tools:
- Density slider: It will make the mask semitransparent, to slightly showing what is hidden.
- Fade slider: It will allow us to make the edges somewhat more diffuse so that the cut is not so hard.
- Select and apply the mask: It will take us to the menu for editing selections and masks, to modify it to our liking. In earlier versions of Photoshop, this option is called Refine Edge. In the next point, we will delve more into the options of this tool.
- Color range: It allows us to create a mask to hide areas with a certain color, as a chroma key.
- Invert: In the same way, we do with Control (or Cmd) + I, with this button we will also be able to invert the colors of the mask, to hide the visible and discover the hidden area.
Perfect Edge: The Secret to a Perfect Selection
You may have noticed that many times when trying to trim intricate areas, such as hair, the selection does not fit properly and also cuts off some of the white backgrounds, creating a dirty look or a selection with hard edges that are too noticeable. To solve this, Photoshop provides us with a very powerful tool: Refine Edge.
This tool will allow us to recalculate these difficult areas to adjust the selection much better , and it will also provide us with various options to modify the border of the selection to our liking, in order to make it smoother and more realistic.
As of the Photoshop CC 2015.5 release, we found that the Refine Edge tool has changed substantially and that it even changes its name to ” Select and Mask “. As it is a very recent version currently, I will show both interfaces so there is no confusion.
Refine Ancient Edge
The Refine Edge tool appears on the top toolbar that appears when we choose any selection tool. In addition, we can also access it from the Selection / Refine border menu , or from the mask options button that we have seen in the previous point.
A window will appear with all the options of this very effective tool. First of all, outside the options window, in the upper toolbar, we see that there is a brush and an eraser, and a size selector.
This brush will be used to paint (or erase in the case of the eraser) on the difficult to select area . When we release the mouse, Photoshop will recalculate that area to locate what is the white background and what is the selected element, thus making a closer cut.
On the other hand, in the window we find many options to modify our selection and adjust it perfectly:
- View: It allows you to see the selection you are making in different ways. Edge detection: Increases the calculation radius of the edge, so that the tool not only analyzes the edge itself but also the surrounding pixels.
- Adjust border: We find different sliders to smooth, feather, contrast, and move the border of the selection. This will allow us to adjust it and make it a little more diffuse, to avoid those hard and sharp edges, so unrealistic.
- Decontaminate colors: If we are going to eliminate a white background that is contaminating the element we want to cut with its color, this element may not look good if we place it on a background with a different color, since that contamination will not make sense. For example, if we take a photo with a green chroma key type white background, the person may adopt a green reflection because of this background, and when putting it later on another background it would be noticeable.
- With this option we can say that the green is contaminating us, so that Photoshop can eliminate it and leave the person free of reflections of the background color.
- Send to: We can decide what we want to do with this selection when we have it finished. We can simply create a selection, or we can choose other options like creating a mask on the current layer, duplicate the layer and create a mask, or even create a new document with this selection as a mask.
Refine New Edge: Select and Apply Mask
The Select and Mask tool appears on the top toolbar that appears when we choose any selection tool. In addition, we can also access it from the Selection / Select and apply mask menu, or from the mask options button that we have seen in the previous point.
This new tool integrates all the options that the old edge refinement had, but it also lets us use any of the other selection tools in the interface itself.
Thus, if the refine edge tool does not correctly recalculate the area, we can adjust it using the rest of the selection tools.
With either of the two tools, we will be able to correctly select complicated areas such as hair, the sky between the branches of trees, fuzzy edges, etc.
In our example photo, we have been able to perfectly trim our model’s hair to paint the white background white and thus achieve a perfect passport photo.
Channel Selection: When Usual Selections Don’t Work
Imagine that you want to cut out, for example, a landscape with many trees, such as the photo below. Doing it with any of the above tools would be impossible, or time-consuming.
How can we do it then? For this, the most appropriate and fastest option is to select by channel.
Let’s take this photo as an example. If we wanted to cut out the sky, with the tools we have seen so far it would be very complicated , right? Even with perfecting the edge, it would be difficult for us, because since everything is so interwoven, it is very possible that it becomes confused and does not know how to differentiate the sky from the branches.
First, we are going to visualize the channels of our photo. In the layers window, if you notice there is a tab next to it that says Channels. If it doesn’t appear, don’t worry, you can activate it from the Window / Channels menu.
We are going to visualize each of the channels by activating and deactivating the eye-shaped icons in front of each channel, to find the channel in which there is greater contrast between the sky and the branches.
Normally it will be the blue channel since it is the one that usually offers more contrast between lights and shadows.
Then, we are going to duplicate this channel by right-clicking on it and giving the option to Duplicate channel. Activate only the display of this duplicated channel, and make sure that this is the channel you have selected.
Next, we are going to try to make the sky as white as possible, and the branches completely black, applying a Levels adjustment from the Image / Adjustments / Levels menu and playing with the triangles until we achieve it.
What we want to achieve with this is to create a black and white image as a mask , where the white will be shown and the black will be hidden.
Do not worry if what you want is to hide the sky, since then we can invest it without problem, in the same way, that I have taught you before.
When you apply the level adjustment, it does not matter that there are parts of the ground that are white (in this case the river and a lot of grass).
Above all, focus on leaving the line that separates the area you want to hide from the area you want to show; in this case, the line that separates the sky from the branches and the horizon.
When you have it ready, accept the level adjustment and, using a black brush, paint directly on the areas that have been white but are not part of the sky.
When you have this kind of painted mask ready, press the Load channel as selection button, which is located below the channels window, and is shaped like a circle with dashed lines. Doing this will select the entire white area perfectly.
Return the channel display to the beginning to see your original image, and hide the display of this duplicated blue channel with the eye icon in front of it, and return to the layers tab.
Changing the White Background of Our Photography
Now that you know various methods to remove the white background from your photo, let’s put the background change into practice.
First of all, you should take into account that the chosen white background must have a perspective and lighting similar to that of your original photo so that it fits correctly.
If the color is different, don’t worry, we can adjust it later with the color correction settings or from the Adobe Camera RAW filter.
Then, it will simply be to drag the photo of the new background to our file so that it opens as a new layer, and place it under the layer with the mask that we have made so that it shows through the transparent area.
Taking advantage of the fact that we had already cut out the sky from the trees, I tried to put a different background on it, with more clouds. It’s easy to try different backgrounds and correct their color until you find the one that best fits your photo montage.
On the other hand, remember that people cast shadows. If the photo is a close-up, we will not need it, but if you place a full-length person somewhere, you must add a shadow to make it believable.
To do this, look at the rest of the shadows of the new background: observe what direction, how hard and what tone they have so that the shadow you are going to add goes accordingly.
We can do it in two different ways:
- Painting: You can create a new empty layer and paint it with a soft brush emulating the position of the person. Then lower the opacity to adjust its darkness to that of the rest of the shadows in the photo.
- Duplicating layer: You can also duplicate the person’s layer and make it black using, for example, the Levels adjustment. Then, from the Edit / Free Transform menu you can modify it to fit the ground.
- Remember that by pressing the right mouse button all the free transformation options will appear.
- To adjust the layer to the ground as a shadow, the ones that will work best for you are Skew and Perspective. With WarpFinally, you will be able to attach the feet of the shadow to the feet of your person.
- In the same way as with the other option, from the opacity of the layer, you can adjust the darkness of the shadow.
- To make the shadow a little more diffuse you can go to the layer mask options and give it a little more fade.
Select, Crop and Experiment!
Now that you know how to perfectly cut out any element or person, you can experiment with different backgrounds to create a multitude of photomontages. You can even combine different cutout elements to create stunning compositions. So, you know, lose your fear of Photoshop, and experiment!
Have you tried any of these techniques to remove the white background from your photography or to make a photomontage? We would love to see them!