One of the most sought-after tutorial a Photoshop user needs to know is how to extract images, ranging from simple to the more complex one, like strands of blown hair, trees, and other images that has intricate edges. Dealing with backgrounds can be a headache also if it happens to be in different colors and hues. Flat, solid colors are the easy ones to work with, which is why most tutorials posted across the web uses this simple photos as their subject.
In this tutorial though, we will tackle the extraction work in a more detailed approach, and the use of the not-so-common Channels tool in Photoshop. Although I believe that the more advanced users of the program are very much familiar with this, especially with layer masking, and use this tool for their extraction work.
First, it’s important to note that our image is in RGB mode, and that we will be sticking in this mode throughout the course of this tutorial. If you read Part 1 of this series (or if you are already familiar with channel basics), you will recall that every RGB image contains a Red, Green and Blue channel. Let’s start by analyzing the 3 channels to determine which one will provide the best starting point for extracting the model from the photograph. Here are the greyscale representations of each channel.
Since the hair is going to be the most challenging part of the extraction, what we are really looking for is the channel where we have the best contrast between the hair and the background. The red channel would probably work, but it’s a bit lighter than is really ideal, so we’ll scratch that one.
The blue and the green channels are pretty similar in terms of the contrast between the hair and the background, so either of those would probably work. However, I think that the blue channel is probably the better option, so let’s go ahead and duplicate it. You can do this by either right-clicking and selecting Duplicate Channel from the menu, or by dragging the blue channel down to the new icon in the channels palette.
Now, with our duplicate blue channel selected, we are going to adjust the brightness and contrast. Select Image>Adjustments>Levels from the menu. For this image, I used the values below for the settings.
These numbers will vary drastically from photograph to photograph, but the basic idea is to adjust these values to the point where the background is white and most of the hair is black. The thin strands, however, should retain a certain amount of grey, as you can see in the screenshot above. Also, try to increase the contrast to the necessary minimum, since too much contrast can cause some of the finer details to vanish, and for some of the softer edges to become jagged and rasterized.
Now, the result is going pretty well. Let us enhance more the contrast by making the hair strands stand out and the background totally white. Afterwards, we’ll paint the image totally black. We will be using the Burn Tool and Paintbrush to do the blackening.
In this step, we will make a selection of what we just made. To do so, press Ctrl + click on the blue copy channel. Marching ants will be seen as a result, signifying the selection is executed. Click the RGB channel to make it active, then turn off your blue channel for now.
Next, switch back to your layers palette. Note that we have to inverse first our image before going to the next step, so go to Select>Inverse… This will result to white foreground (visible) and black background (not visible) as seen in the layer mask thumbnail that we will do next. Hence, with layer 0 (our original image) active, make a layer mask by clicking the mask icon below the layers palette. Here’s how it looks:
Create a new layer now or open an image that will serve as your new background. Drag this below your existing layer. In my case, I just made a blue gradient as my background as seen below.
Now it’s the finishing touches… Grab the Burn Tool and carefully brush away the fuzziness around the image especially the thin strands of hair. Don’t overdo it though to maintain some of the strands to its grayish state. Optionally, you can enhance the whole image by using the Curves in Image adjustments. Here is the final result :