In this example i would like to turn the background white and when you look at the scattered hair it obviously is really hard if not impossible when using the magic wand tool. The magic wand tool does not make the cut. Since it is quite clear that there is the contrasting regions of dark (hair) and light region (background) i was wondering if there is a tool or function in GIMP to lighten the obvious contrasting region like a binary function that detects either light or dark area and applies the tool to either the dark or light area and do a certain color function on this region (i.e. turn light region to white or another color). Currently my methodology is to turn the saturation to zero of the selected hair region and use the brightness/contrast tool but it does not always work out well (example if hair is not dark) and there is loss of hair sometimes. In this example it works out. So far this is the best method i've found and used better than magic wand.
The photograph looks quite poor quality, so it might be difficult to do this. I don't know how much time you have to invest in the edit, but it might not be worth your while on such a poor quality image. Phone camera lenses can produce that kind of low contrast effect if the lens is dirty/greasy. Maybe encourage them to clean the lens before taking the photo. Also with most phones the back camera is usually better than the front camera. Maybe ask them to get someone to take the photo instead of trying to take a selfie. It's always better to try to get the best quality image possible from the camera before editing.
GIMP has a foreground select tool which may work in some cases, but it will probably fail on your image because it needs some contrast to work well. There are tutorials on youtube if you want to try that route. I also answered a question here which describes the basic steps. It also works on wispy hair
Anyway it is possible to create a nice layer mask manually from an image that has a lighter background and darker wispy hair.
Go to the Channels panel, and right click the channel which has the most contrasty image, and do Channel to Selection. Then back to the layers panel, add a layer mask and choose the option to create it "from selection", and hit the "invert" option.
You'll get something like this as the mask.
- Next apply curves to the mask, a nice S-curve will usually do the trick. the idea here is basically to increase the contrast a bit.
- With a medium soft edge brush set to normal mode, and white, paint inside the mask making sure not to go near the edge
- Set the brush to Overlay mode, and bring down the opacity to something like 30%. Then set the foreground colour to white. Paint over the hairs at the edge to brighten them up. Then switch to black and paint over the background to make it darker.
Something like this. You can take more time than me perhaps
Here's the result, toggling the mask and background on and off