Expanding selections

show more Expanding selections provides you with in-depth training on Photography. Taught by Jan Kabili as part of the Photoshop CS5: Selections in Depth show less
please wait ...

Expanding selections

If you have large areas of similar color and tone to select, you can often expand a partial selection to a full selection using the Similar and Grow commands in the Select menu. In this image, I'd like to isolate these bamboo shoots so that I can change out the red background for another color. I am going to start by selecting the red background because that looks like it's going to be easier to select than the bamboo shoots, and so I am looking for the quickest way to select that red background. I'll start by seeing if I can select just a section in here, between these bamboo shoots.

To do that, I am going to make a very small selection with the Lasso tool, just because the Lasso tool is quick and easy. I'll click and drag a circular selection in the image and release my mouse. Next, I am going to try to expand that small selection to this entire section by going up to the Select menu and choosing Grow. Sure enough, with just one command, I've selected all of the red pixels in between these green bamboo shoots. What Grow does is select pixels that are similar in color and tone to the pixels in the initial selection.

But it limits the expanded selection to contiguous pixels, meaning pixels that are adjacent to one another as opposed to those that are separated, like the other red pixels that are separated by these green bamboo shoots. What if I want to select all the red pixels in the image, including the non-contiguous pixels, the ones that are separated by the green bamboo shoots. To show you that, I'm going to undo by pressing Command+Z on the Mac or Ctrl+Z on the PC, so I once again, have my small selection made with the Lasso tool.

This time from the Select menu I'll choose not Grow, but Similar. Now, almost all of the red background is selected, with the exception of some lighter red pixels down here at the bottom. If I want to include those, I can just try running the same command again, so I'll go back to the Select menu, and I'll choose Similar again, and that pretty much did the trick. Almost all the red pixels are selected, at least as they show up here, in the marching ants view. But of course, I'm not done. I said that what I really want to select are the green bamboo shoots, so I'll go up to the Select menu, and I'll choose Inverse, and that inverts my selection so that now the bamboo shoots and the sand on the ground are what's selected, rather than the red background.

I'll take advantage of the new Refine Edge dialog box to refine this selection even further. I'll click Refine Edge. I am going to view against a black background because I'm planning to put a dark background behind these bamboo shoots. I'll go to the Edge Detection area, and I'll click Smart Radius, and then I'll increase the Radius. As I do, you can see that I'm getting a much more detailed and fine selection around the leaves, as well as the bamboo shoots. There is still a little bit of the red from the background along some of the bamboo shoots and leaves, so I'll go down to Decontaminate Colors in order to remove some of that red fringe, and I'll increase the Decontaminate Colors Amount slider.

When I'm done, I'm going to output to a new layer because all I want are the bamboo shoots isolated on their own layer without a red background. I'll click OK, and you can now see that there is a new layer in the Layers panel, the Background copy layer. I'll double-click that and call it the bamboo layer, and what it contains are the isolated bamboo shoots against a transparent background. Now, I want to add a different color background behind these bamboo shoots. So, with the bamboo layer selected, I'll go down to the Create New layer button, and I'll hold the Command key on the Mac, the Ctrl key on a PC to create a new layer beneath the selected bamboo layer.

This is going to be my background layer. I'll double-click the layer name, and I'll just call this bg. I am going to fill that background layer completely with the blue color that I have in the foreground color box by pressing Option+Delete on the Mac or Alt+Backspace on the PC. There is my result, which I think is pretty good, given the amount of work I put into this. I just started with an easy-to-make Lasso tool selection, and then I expanded that selection by applying the similar command a couple of times from the Select menu. I am going to switch to another image now to show you another situation in which the Grow and Select commands come in handy, and that's when I have an initial selection that includes most of the pixels that I want, but there are a few stubborn pixels that have been left out, and this is something that often happens when I start with a Magic Wand tool selection. So, I'll do that.

I'll select the Magic Wand. I'll use its default settings, which includes having Contiguous checked and the Tolerance set to the default level of 32. I'll click with that tool inside of this section of the background. I wasn't able to select any of the red pixels out here, but I selected almost all of the red pixels in this area. I just want to expand the selection to this little bit up here, and that's when the Grow command comes in handy. So I'll choose Select and Grow, and that does the trick.

Now, if I want to select all of the non- contiguous red pixels as well, I'll go to Select > Similar, and I've got almost all of my selection made. Sometimes you run into a situation like this, where there is a little bit that isn't selected, and in this case I have a couple of options. As I mentioned before, I could again apply the Grow or Similar command, but another option is to select the Magic Wand tool, if it's not already selected, and then go to the Tolerance field in the Options bar for the Magic Wand and increase the Tolerance.

Now the problem is you never know what number to type in here; it's just a blind guess. I am going to try typing in 60. Although you can't tell on the surface, it's the Tolerance setting for the Magic Wand tool that determines the range of color and tone that are selected by the Grow and Similar commands. So with Tolerance increased, let's see what happens if I go to Select and then to Similar. And that does expand the selection to include all of the red pixels in this case. So the Grow and Similar commands may be hard to discover, but now that you know about them, here in the Select menu, you can see that they really can save your time and effort when you have a large area of similar tone and color to select.

Don't forget about these useful commands.

Expanding selections
Video duration: 6m 21s 3h 45m Intermediate


Expanding selections provides you with in-depth training on Photography. Taught by Jan Kabili as part of the Photoshop CS5: Selections in Depth

please wait ...