Replacing the background in a photograph is one of the most common digital image processing tasks. The most flexible way to achieve a quality result is to create masks. This method will not force you to go back to the very beginning of work if you are not satisfied with the result. This approach is especially important for streaming.
Instructions
Step 1
Upload a photo. Highlight the background in any way you can. It is convenient to use the Magic Wand Tool. However, to select "difficult" objects, such as, for example, a portrait of a person with developing hair, it is better to choose the "selection by color" (Color Range).
Step 2
Then convert the "background" to a layer by double clicking on it and invert the selection. Create a mask by activating the Add Layer button on the Layers panel or by executing the appropriate command in the Layer menu. Go into the mask and blur it with "Gaussian Blur".
Step 3
Apply the resulting mask to the new background. Unlike other selection methods, the "Color Range" command is able to capture excess, as a result of which the background appears where it should not be. Eliminate this excess background by adjusting the mask with a large eraser.
Step 4
It is possible that the edges of an object, such as hair, will look “eaten away”. To eliminate this effect, duplicate the layer. Turn on the multiply mode for the lower layer and wipe the mask with an eraser so that it stops "cutting" the hair. Then, continuing to work on the bottom layer, turn on the top one. With brightness - with contrast or levels, multiply the background and layer so that the hair looks natural. This is how the permutation is performed on a light background.
Step 5
If it is dark, replace the Multiply mode with Linear Light Mode or Hard Light Mode. For a clearer look at the hair, apply a strong "Unsharp Mask Filter" to the bottom layer. Also for selection you can use tools "Pen Tool" or "Magic Lasso", for "cleaning" hair - "Background Erase". To separate the object from the background, the "Extract" command will do.
Step 6
Remember that shooting technology is also important for the best results. Soft saturated colors of the background on which the shooting was carried out will simplify the latter as much as possible. It is important to take into account that when rearranging to a light background, you need to shoot against a light background, and for rearrangement to a dark background - on a dark one.