Select complex image areas with precision

Oct 31, 2016 No Comments by

You can make selections in Photoshop using a number of tools—which tool you use depends on the type of selection you need to make. Some areas, such as a solid dark color on a white background, are easy to select using the Magic Wand tool. Other areas, such as a multicolored object with smooth, clean lines on a multicolored background, are a little more difficult to select. Still, the Lasso or Pen tool usually does the trick. Then, there are image areas like the one shown in Figure A. How on earth do you make a selection around all that hair without making it look like a bad haircut? We’ll show you how in this article.


Figure A:

ips16705a


Mission statement
Of course, the leading question is why does one need to create selections at all? In this case, we want to silhouette the model from the background in our image. To follow along, download the file selections.zip, and extract the file model.jpg , launch Photoshop and open the file. (Images provided by PhotoSpin. Some images modified for educational purposes.)

Step 1: Select a channel
Hair is possibly one of the hardest things to select in a portrait image. It can be done, though, and done well. The first step is to look at each color channel and determine which one has the most contrasting shadow, midtone, and highlight detail. This will help us isolate the portion of the image we want to select.
To begin, choose Window > Channels to display the Channels panel. As usual, we’re working in RGB Color mode, so we have three channels (Red, Green, and Blue) to evaluate. All channels are currently showing, as indicated by the Eye icon to the left of each channel. To look at each channel individually, as shown in Figure B, we need to turn the visibility off for the other channels. Cycling through these three channels helps us determine that the Blue channel has the most contrast between the model’s hair and the background.


Figure B:
ips16705b


Step 2: Copy the selected channel
Now that we know which channel we’ll use for the selection, we need to make a copy of it. To do this, drag and drop the Blue channel on the Create New Channel button, located at the bottom of the Channels panel. Your Channels panel now has a fourth channel, as shown in Figure C.


Figure C:

ips16705c


Step 3: Adjust the level of contrast
Next, we’ll exaggerate the shadow, midtone, and highlight detail on the Blue Copy channel using the Levels command. This will make it even easier to silhouette the model from the background.

First, activate the Blue Copy channel by selecting it. Now, choose Image > Adjustments > Levels or press [command]L ([Ctrl]L in Windows) to open the Levels dialog box. As shown in Figure D1, our goal is to force the subject area to nearly black and the background to mostly white. To do this, in the Input Levels text boxes, enter the shadow, midtone, and highlight values shown in Figure D2. (You may need to adjust these levels if you’re working in a different image.) Then, click OK.


Figure D1:

ips16705d1

Figure D2:

ips16705d2

Figure E1:

ips16705e1

Figure E2:

ips16705e2


Step 4: Touch up the mask
At this point, we have a pretty good channel mask to work with. However, we still need to remove some of the lightest areas in the model’s dress and on her face from the selection. To create the final mask shown in Figure E1, we’ll paint over these areas.

To do this, go to the Channels panel and make all the channels visible but, as shown in Figure E2, only activate the channel mask. Next, select the Brush tool and, on the tool options bar, click the Brush thumbnail to open the Brush Preset picker. Set the Master Diameter to 65 px and the Hardness to 50%. Then, paint over the model’s dress and any areas where the skin is exposed.

Step 5: Work with the selection
Finally, we can load the selection to see how well we did. To do this, choose Select > Load Selection. In the Load Selection dialog box, verify that your settings match those in Figure F. Then, click OK.


Figure F:

ips16705f

At this point, only the background should be selected. If any areas of the model are selected, use the Lasso tool to subtract them from the selection. To do this, click the Subtract From Selection button on the tool options bar and then drag the Lasso tool around any selected areas that aren’t part of the background. With our selection complete, take a look at what we can do:

  • We can remove the detail in the selected background and leave the area around the model white or fill it with color or a pattern.
  • We can inverse the selection to around the model and save the selection or use it to create a channel mask or clipping path that silhouettes the model from the background.

These options open up several possibilities. Just for fun, let’s remove the detail in the selected background and fill the area with a pattern.

First, select the RGB composite channel in the Channels panel and hide the Blue Copy channel by clicking on its eye icon. Next, press the [delete] key to clear the selected pixels in the background. Now, choose Edit > Fill to open the Fill dialog box, as shown in Figure G1.

In the Contents pane, choose Pattern from the Use pop-up menu and then click on the Custom Pattern thumbnail to display the Pattern picker. Double-click on a pattern to select it and to close the Pattern picker. We selected Blue Crepe. Finally, set the blending mode and opacity as you wish and click OK to fill the background with the selected pattern, as shown in Figure G2.


Figure G1:

ips16705g1

Figure G2:

ips16705g2

Adobe Photoshop, Tips & Tutorials

Eli Journals is the leading provider of computer technology journals and information products. If you want to become a more proficient computer user at work or in your personal pursuits, you’ll find that Eli Journals is the best source for comprehensive, innovative and timely information on the technology that is changing the world today.

Comments are closed.