STEPS: Selecting a Monstrously Complicated Image Using a Mask

1. Browse the color channels. Press Ctrl+1 to see the red channel, Ctrl+2 for green, and Ctrl+3 for blue. (This assumes you're working inside an RGB image. You can also peruse CMYK and Lab images. If you're editing a grayscale image, you have only one channel from which to choose — Black.)

Figure 9-29 shows the three channels in my RGB image. Of the three, the red channel offers the most contrast between the hair, which appears very light, and the background, which appears quite dark.

Figure 9-29: Of the three color channels, the red channel offers the best contrast between hair and background.

2. Copy the channel. Drag the channel onto the little page icon at the bottom of the Channels palette. (I naturally copy the red channel.) Now you can work on the channel to your heart's content without harming the image itself.

3. Choose Filter ^ Other ^ High Pass. The next thing you want to do is to force Photoshop to bring out the edges in the image so you don't have to hunt for them manually. And when you think edges, you should think filters. All of Photoshop's edge-detection prowess is packed into the Filter menu. Several edge-detection filters are available to you — Unsharp Mask, Find Edges, and many others that I discuss in Chapter 10. But the best filter for finding edges inside a mask is Filter ^ Other ^ High Pass.

High Pass selectively turns an image gray. High Pass may sound strange, but it's quite useful. The filter turns the non-edges completely gray while leaving the edges mostly intact, thus dividing edges and non-edges into different brightness camps, based on the Radius value in the High Pass dialog box. Unlike in most filters, a low Radius value produces a more pronounced effect than a high one, in effect locating more edges.

Figure 9-30 shows the original red channel on left with the result of the High Pass filter on right. I used a Radius of 10, which is a nice, moderate value. The lower you go, the more edges you find and the more work you make for yourself. A Radius of 3 is accurate, but it'll take you an hour to fill in the mask. Granted, 10 is less accurate, but if you value your time, it's more sensible.

Figure 9-30: After copying the red channel (left), I apply the High Pass filter with a Radius value of 10 to highlight the edges in the image (right).

4. Choose Image ^ Adjust ^ Levels (Ctrl+L). After adding all that gray to the image, follow it up by increasing the contrast. And the best command for enhancing contrast is Levels. Although I discuss this command in-depth in Chapter 17, here's the short version: Inside the Levels dialog box, raise the first Input Levels value to make the dark colors darker, and lower the third Input Levels value to make the light colors lighter. (For now you can ignore the middle value.)

Figure 9-31 shows the result of raising the first Input Levels value to 110 and lowering the third value to 155. As you can see in the left-hand image, this gives me some excellent contrast between the white hairs and black background.

To demonstrate the importance of the High Pass command in these steps, I've shown what would happen if I had skipped Step 3 in the right-hand image in Figure 9-31. I applied the same Levels values as in the left image, and yet the image is washed out and quite lacking in edges. Look at that wimpy hair. It simply is unacceptable.

Figure 9-31: Here are the results of applying the Levels command to the mask after the High Pass step (left) and without High Pass (right). As you can see, High Pass has a pronounced effect on the edge detail.

5. Use the lasso tool to remove the big stuff you don't need. By way of High Pass and Levels, Photoshop has presented you with a complex coloring book. From here on, it's a matter of coloring inside the lines. To simplify things, get rid of the stuff you know you don't need. All you care about is the area where the girl meets her background — mostly hair and arms. Everything else goes to white or black.

For example, in Figure 9-32, I selected a general area inside the girl by Alt-clicking with the lasso tool. Then I filled it with white by pressing Ctrl+Delete. I also selected around the outside of the hair and filled it with black. At all times, I was careful to stay about 10 to 20 pixels away from the hair and other edges; these I need to brush in carefully with the eraser. (Be sure to press Ctrl+D to eliminate the selection before continuing to the next step.)

Figure 9-32: To tidy things up a bit, I selected the general areas inside and outside the girl with the lasso tool and filled them with white or black (left). Then I painted inside the lines with the block eraser (right).

6. Erase inside the lines with the block eraser. This is the most time-consuming part. You now have to paint inside the lines to make the edge pixels white (selected) or black (not). I like to use the block eraser because it's a hard-edged block. See, Photoshop has already presented me with these lovely and accurate edges. I don't want to gum things up by introducing new edges with a soft paintbrush or airbrush. The block eraser is hard, you can easily see its exact boundaries, and it automatically adjusts as you zoom in and out — affecting fewer pixels at higher levels of magnification, which is what you need. When working in a mask, the eraser always paints in the background color. So, use the X key to toggle the background color between white and black.

The second example in Figure 9-32 shows the fruits of my erasing. As you can see, I make a few judgment calls and decide — sometimes arbitrarily — where the hair gets so thick that background imagery won't show through. You may even disagree with some of my eraser strokes. But you know what? It doesn't matter. Despite whatever flaws I may have introduced, my mask is more than accurate enough to select the girl and her unruly hair, as I soon demonstrate.

7. Switch to the color composite view. Press Ctrl+tilde (~). Or if you're working in a grayscale image, press Ctrl+1. By the way, now is a good time to save the image if you haven't already done so.

8. Ctrl-click the mask channel to convert it to a selection. This mask is ready to go prime time.

9. Ctrl-drag the selection and drop it into a different image. Figure 9-33 shows the result of dropping the girl into a background of rolling California hills. Thanks to my mask, she looks as natural in her new environment as she did in her previous one. In fact, an uninitiated viewer might have difficulty believing this isn't how she was originally photographed. But if you take a peek at Figure 9-29, you can confirm that Figure 9-33 is indeed an artificial composite. I lost a few strands of hair in the transition, but she can afford it.

Figure 9-33: Thanks to masking, our girl has found a new life in Southern California. Now she's ready to finally put on those sunglasses.

The grayscale Figure 9-33 looks great but, in all honesty, your compositions may not fare quite so well in color, as illustrated by the first girl in Color Plate 9-3. Her hair is fringed with blue, an unavoidable holdover from her original blue background.

The solution is to brush in the color from her new background. Using the paintbrush tool set to the Color brush mode, you can Alt-click in the Background layer to lift colors from the new background and then paint them into the hair. I also took the liberty of erasing a few of the more disorderly hairs, especially the dark ones above her head. (I used a soft paintbrush-style eraser, incidentally, not the block.) After a minute or two of painting and erasing, I arrived at the second girl in the color plate. Now if that isn't compositing perfection, I don't know what is.

Photoshop Secrets

Photoshop Secrets

Are You Frustrated Because Your Graphics Are Not Looking Professional? Have You Been Slaving Over Your Projects, But Find Yourself Not Getting What You Want From Your Generic Graphic Software? Well, youre about to learn some of the secrets and tips to enhance your images, photos and other projects that you are trying to create and make look professional.

Get My Free Ebook


Post a comment