Monday, December 24, 2012

Image Extraction Using Channels in Photoshop

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.

The difficulty in extracting an image, whatever tool you use, varies depending on the complexity of the photo used. There’s a more effective tool that suits a specific image, actually. For example, a simple photo with a plain white or solid background can easily be extracted via the Quick Selection Tool or Polygonal Lasso Tool without going through a more time-consuming Channels and Layer Mask tool. But then, it’s also a question of comfortability and ease which, if I may to choose, prefers the latter indeed.

In this tutorial, 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.

Stocks Used



1. Background


2.Britney Spears

Preview


Here is the before and after image. I've added a multi-color effect on the image as well other than the background. It is optional though because we will be focusing more on the topic of extraction using the channels method.

Step 1


To begin with, 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. 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.
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.
Based on the above images, the blue channel appears to have the best contrast compared to that of the red and green channels which are both light and has a poor contrast between the hair and the background . So, we'll take the blue channel and then duplicate it.

The image below shows the problem areas that we have to fix: the background and the side edges of the hair appears to be both white in color, and it's hardly visible for the strands of hair to be recognized. So we'll have to fix these. To do so, we'll do that in Step 2.


Step 2


Now, with our duplicated blue channel selected, we are going to enhance further the contrast of the image by going to Image>Adjustments>Brightness/Contrast...



After the above, we will adjust the contrast more to obtain an almost black and white image. To do it, go to Image>Adjustments>Levels...with the following settings:
Here is the result:
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 black and most of the hair is white (or vice versa, as in this case). 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 rasterised.

Now, grab the Burn Tool and apply on the edges of the hair to blacken some of the strands while leaving the finer parts on their original (i.e., grayish) state. And then, paint the image black totally using the Paintbrush Tool. It will look something like this for now:
Okay, before leaving this step, Ctrl+click the blue channel copy, and marching ants of some sort will be seen. This signifies that the image is selected.

Step 3


In this step, we want to turn the RGB channel back on so that we can see everything in full colour again.

Step 4


Switch back to the Layers palette, double-click the background to unlock it. This will become Layer 0, by default. Go to Select>Inverse..., then apply layer mask by clicking the Add layer mask icon below the layers palette. It should look like this now:

Step 5


Open a new layer for your background. You can choose whatever you like - solid color, gradient, pattern, or another image. I uploaded an image here (see above stock) then converted it into a pattern (via Edit>Define Pattern...). Place this under the existing layer.

Step 6


For the finishing touches, take your Burn Tool and apply moderately around the edges of the hair to brush away the rough edges. After this, apply Refine Mask to enhance the masked image, if necessary.
Merge visible layers for now...
Go to Image>Adjustments>Curves...

Step 7


Time to colorize the image. Paint it diagonally with diffeent colors using a large, soft brush. When filled, apply Gaussian Blur, radius to maximum to the right, and then set the blending mode to Linear Light (or any mode that suites your subject).
DONE!