It is indeed troublesome to extract the hair in the photo (especially the hair that has more layers and is closer to the background color). There are often problems such as the background cannot be extracted cleanly or too much detail is lost.
Here is a method to cut out hair and change the background in Photoshop, which can help you avoid the situation of dirty background and loss of details.
The effect after cutting out the hair and changing the background is as follows:
1. First, we open the picture in Photoshop, copy three layers of background, execute the extraction filter, and force the foreground respectively. The color is set as the main color of the hair (brown, because this is a dark brown with a large difference in background color), black, white. (To prevent mistakes during repair, they can be named separately)
2. Cut out the main body of the character and drag it to the top of the layer. I cut it out more casually here. You can dig it more finely, which will make it easier to adjust later.
3. Create a new layer on the background layer and fill it with color so that we can see clearly when repairing the image;
4. Set the color of the black layer to deepen, and adjust its transparency, trying to make the color of the entire hair close to the original image; at this time, if we look carefully, we will find the combination of the cut-out character body and the layer extracted by the filter. There will be a phenomenon of color shades not blending;
5. Add a layer mask to the black layer and use a black brush with appropriate hardness to repair it. (This step can be set by yourself according to different pictures, carefully adjust the opacity of the brush, and apply it on the hair joint on the mask) The purpose is to make the cut-out character body and the hair joint extracted by the filter blend naturally; at the same time, you can use Mask to remove unnecessary noise.
6. If the main color of the hair is not dark enough (here it is brown), you can copy the main color and extract the layer, create a new adjustment layer (here it is a brown copy) and adjust its transparency (set the properties to normal);
7. If you find that the highlights are insufficient, in the same way, copy the white extraction layer, add a mask, and trim away the edges and parts that do not need to be highlighted.
Basically satisfied with the effect, merge the layers. Finish.
As long as you are careful, you can also pull out the so-called difficult hair.