Selecting Irregular Areas

As you might imagine, areas that aren’t uniform in shape or color can be a real bear to select. Luckily, Photoshop has a few tools in its arsenal to help you get the job done. In this section, you’ll learn about the three lassos and the Pen tool, as well as a few ways to use these tools together to select hard-to-grab spots.

The Lasso Tools

The lasso toolset contains three freeform tools that let you draw an outline around the area you want to select. If you’ve got an amazingly steady mouse hand or if you use a digital drawing tablet (see the box on The Joy of Painter), you may fall in love with the plain ol’ Lasso tool. If you’re trying to select an object with a lot of straight edges, the Polygonal Lasso tool will do you proud. And the Magnetic Lasso tries to create a selection for you by examining the color of the pixels your cursor is over. This section explains all three tools, which share a slot near the top of the Tools panel (see Figure 4-14).

So many lassos, so little time!The regular Lasso tool is great for drawing a selection freehand, the Polygonal Lasso is good for drawing selections around shapes that have a lot of straight lines, and the Magnetic Lasso is like an automatic version of the regular Lasso—it tries to create the selection for you.

Figure 4-14. So many lassos, so little time! The regular Lasso tool is great for drawing a selection freehand, the Polygonal Lasso is good for drawing selections around shapes that have a lot of straight lines, and the Magnetic Lasso is like an automatic version of the regular Lasso—it tries to create the selection for you.

Lasso Tool

The regular Lasso tool lets you draw a selection completely freeform as if you were drawing with a pencil. To activate this tool, simply click it in the Tools panel (its icon looks like a tiny lasso—no surprise there) or press the L key. Then click in your document and drag to create a selection. When you release the mouse button, Photoshop completes the selection with a straight line (that is, if you don’t complete it yourself by mousing back over your starting point) and you see marching ants.

The Options bar sports the same settings for both the Lasso tool and the Polygonal Lasso tool:

  • Mode. These four icons (labeled in Figure 4-14) let you choose among the same modes you get for most of the selection tools: New, “Add to selection,” “Subtract from selection,” and “Intersect with selection.” They’re discussed in detail back on The Rectangular and Elliptical Marquee Tools.

  • Feather. If you want Photoshop to soften the edges of your selection, enter a pixel value in this field. Otherwise, the selection will have a hard edge. (See the box on The Softer Side of Selections for more on feathering.)

  • Anti-alias. If you leave this setting turned on, Photoshop slightly blurs the edges of your selection, making them less jagged—The Rectangular and Elliptical Marquee Tools has the details.

  • Refine Edge. This button summons the mighty Refine Edge dialog box, which you can use to fine-tune your selection (it’s especially helpful when you’re selecting hair and fur). You’ll learn all about it starting on Creating Selections with Channels.

Polygonal Lasso Tool

If your image has a lot of straight lines in it (like the star in Figure 4-15), the Polygonal Lasso tool is your ticket. Instead of letting you draw a selection that’s any shape at all, the Polygonal Lasso draws only straight lines. It’s super simple to use: click once to set the starting point, move your cursor along the shape of the item you want to select, and then click again where the angle changes; repeat this process until you’ve outlined the whole shape. To complete the selection, point your cursor at the first point you created. When a tiny circle appears below the cursor (it looks like a degree symbol), click once to close the selection and summon the marching ants.

The Polygonal Lasso tool is perfect for selecting geometric shapes and areas that have a lot of angles. If you need to temporarily switch to the regular Lasso tool to perfect your selection, press and hold Option (Alt on a PC) to draw freehand.Conversely, if you’re using the regular Lasso tool, it’s nearly impossible to draw a straight line unless you’ve got the steady hand of a surgeon. But if you press and hold the Option key (Alt on a PC), and then release your mouse button, you’ll temporarily switch to the Polygonal Lasso tool so you can draw a straight line. When you release the Option (Alt) key, Photoshop completes your selection with a straight line.

Figure 4-15. The Polygonal Lasso tool is perfect for selecting geometric shapes and areas that have a lot of angles. If you need to temporarily switch to the regular Lasso tool to perfect your selection, press and hold Option (Alt on a PC) to draw freehand. Conversely, if you’re using the regular Lasso tool, it’s nearly impossible to draw a straight line unless you’ve got the steady hand of a surgeon. But if you press and hold the Option key (Alt on a PC), and then release your mouse button, you’ll temporarily switch to the Polygonal Lasso tool so you can draw a straight line. When you release the Option (Alt) key, Photoshop completes your selection with a straight line.

Tip

To bail out of a selection you’ve started drawing with any Lasso tool, just tap the Esc key.

Magnetic Lasso Tool

This tool has all the power of the other lasso tools, except that it’s smart—or at least it tries to be! Click once to set a starting point, and the Magnetic Lasso tries to guess what you want to select by examining the colors of the pixels your cursor is over (you don’t even need to hold your mouse button down). As you move your cursor over the edges you want to select, it sets additional anchor points (fastening points that latch onto the path you’re tracing; they look like tiny, see-through squares). To close the selection, put the cursor over your starting point. When a tiny circle appears below the cursor, click once to close the selection and summon the marching ants (or triple-click to close the selection with a straight line).

As you might imagine, the Magnetic Lasso tool works best when there’s strong contrast between the object you want to select and the area around it (see Figure 4-16). If you reach an area that doesn’t have much contrast—or a sharp corner—you can give the tool a little nudge by clicking to set a few anchor points of your own. If it goes astray and sets an erroneous anchor point, tap the Delete key (Backspace on a PC) to get rid of that point and then click to set more anchor points until you reach an area of greater contrast where the tool can be trusted to set its own points.

The Magnetic Lasso works great for selecting objects on plain, high-contrast backgrounds because it can easily find the edge of the object. For best results, glide your cursor slowly around the object’s edge (you don’t need to hold your mouse button down). To draw a straight line, temporarily switch to the Polygonal Lasso tool by Option-clicking (Alt-clicking on a PC) where you want the line to start, and then clicking where you want it to end. Photoshop then switches back to the Magnetic Lasso, and you’re free to continue gliding around the rest of the object.

Figure 4-16. The Magnetic Lasso works great for selecting objects on plain, high-contrast backgrounds because it can easily find the edge of the object. For best results, glide your cursor slowly around the object’s edge (you don’t need to hold your mouse button down). To draw a straight line, temporarily switch to the Polygonal Lasso tool by Option-clicking (Alt-clicking on a PC) where you want the line to start, and then clicking where you want it to end. Photoshop then switches back to the Magnetic Lasso, and you’re free to continue gliding around the rest of the object.

Tip

If you’re not crazy about the Magnetic Lasso’s cursor (which looks like a triangle and a horseshoe magnet), press the Caps Lock key to changes it to a brush cursor with crosshairs at its center. Press Caps Lock again to switch back to the standard cursor. Alternatively, you can use Photoshop’s preferences to change it to a precise cursor; Controlling the Brush Cursor’s Appearance explains how.

You can get better results with this tool by adjusting its Options bar’s settings (shown in Figure 4-16). Besides the usual suspects like selection mode, feather, and anti-alias (all discussed on The Rectangular and Elliptical Marquee Tools and The Rectangular and Elliptical Marquee Tools), you also get:

  • Width determines how close your cursor needs to be to an edge for the Magnetic Lasso to select it. From the factory, this field is set to 10 pixels, but you can enter a value between 1 and 256. Use a lower number when you’re trying to select an area whose edge has a lot of twists and turns, and a higher number for an area with fairly smooth edges. For example, to select the yellow rose in Figure 4-16, you’d use a higher setting around the petals and a lower setting around the leaves because they’re so jagged.

    Tip

    You can change the Width setting in 1-pixel increments while you’re using the Magnetic Lasso by pressing the [ and ] keys. You can also press Shift-[ to set the width to 1 and Shift-] to set it to 256.

  • Contrast controls how much color difference there needs to be between neighboring pixels for the Magnetic Lasso to recognize it as an edge. You can try increasing this percentage when you want to select an edge that isn’t well defined, but you might have better luck with a different selection tool. If you’re a fan of keyboard shortcuts, press the comma (,) or period (.) key to decrease or increase this setting in 1 percent increments, respectively while you’re making a selection; add the Shift key to these keyboard shortcuts to set it to 1 percent or 100 percent, respectively.

  • Frequency determines how many anchor points the tool lays down. You need more anchor points to select an area with lots of details than for a smooth area. Setting this field to 0 makes Photoshop add very few points, and 100 makes it have a point party. The factory setting—57—usually works fine. You can press the semicolon (;) or apostrophe (‘) key while you’re using the tool to decrease or increase this setting by 3, respectively; add the Shift key to these keyboard shortcuts to jump between 1 and 100.

  • Use tablet pressure to change pen width. If you have a pressure-sensitive digital drawing tablet, turning on this setting—whose icon looks like a pen tip with circles around it—lets you override the Width setting by pressing harder or softer on the tablet with your stylus. (The box on The Joy of Painter has more about digital drawing tablets.)

  • Refine Edge. If you need to fine-tune your selection, click this button to open the Refine Edge dialog box, which you’ll learn about beginning on Creating Selections with Channels.

Selecting with Focus Area

It’s not often that new selection tools come along, but when they do, they’re extremely helpful (case in point: the Quick Selection tool). New in this version of Photoshop CC is the Focus Area command, which you can use to automatically select the area of a photo that’s in focus (in other words, the part that’s sharp not blurry). It works best on images with a strong, in-focus subject and a soft, blurry background, like the one in Figure 4-17.

Note

To try this new command yourself, trot on over to this book’s Missing CD page at www.missingmanuals.com/cds and download the file Cowgirl.jpg.

With decent contrast, the selection you get with this command is pretty darn good! Rare is the photo where Focus Area generates a perfect selection, but you can tweak the result easily enough using the settings shown here. Plus, this command is a great first step in creating a selection that you intend to fine-tune in the Refine Edge dialog box.The View menu lets you change the way Photoshop previews the selection in your document; see page 183 for a discussion of these options.

Figure 4-17. With decent contrast, the selection you get with this command is pretty darn good! Rare is the photo where Focus Area generates a perfect selection, but you can tweak the result easily enough using the settings shown here. Plus, this command is a great first step in creating a selection that you intend to fine-tune in the Refine Edge dialog box. The View menu lets you change the way Photoshop previews the selection in your document; see page 183 for a discussion of these options.

To use this handy new selection helper, open an image and choose Select→Focus Area. Photoshop analyzes your image and automatically generates an initial selection. If the result isn’t perfect (and it won’t be), in the Focus Area dialog box, drag the In-Focus Range slider left to select fewer pixels of the in-focus area, or right to select more. You can also mouse over to your image and paint across any areas that Photoshop missed that you want included in the selection (Photoshop automatically activates the Add brush labeled in Figure 4-17). When you release your mouse button, Photoshop analyzes what you painted across. If there’s a decent amount of contrast between your subject’s edge and the background in that area, Photoshop includes that part of the subject in the selection.

Tip

When you’re fine-tuning a selection created by the Focus Area command, it’s helpful to zoom into your image by pressing ⌘-+ (Ctrl-+ on a PC) repeatedly. Pressing the spacebar summons the Hand tool, which you can use to move around within the image once you’re zoomed in. (Alternatively, you can use the Zoom and Hand tools in the Focus Area dialog box.)

To remove an area from the selection, click the Subtract brush to activate it, and then brush across that spot, or simply Option-drag (Alt-drag on a PC) with the Add brush to put it in subtract mode. Either way, when you release your mouse button, Photoshop analyzes the area you painted across and (hopefully) removes it from the selection (again, how well Photoshop does depends on the amount of contrast between your subject and background).

Clicking the flippy triangle next to Advanced reveals an Image Noise Level slider that you can use to keep Photoshop from including too much of a noisy image’s background in your selection. Dragging it left includes more of your image’s noisy areas in the selection; dragging right excludes them.

Tip

If the selection still needs more work, click Refine Edge to open the selection in the powerful Refine Edge dialog box, which is covered starting on Creating Selections with Channels.

When the selection looks good, turn on Soften Edges to apply a small amount of blur around the selection’s edges so they don’t look jagged, and then use the Output menu to tell Photoshop what to do with the selection. (Your choices are self-explanatory; they’re identical to the ones you get in the Refine Edge dialog box, which are covered on Refining Edges.) Click OK when you’re finished.

Selecting with the Pen Tool

Another great way to select an irregular object or area is to trace its outline with the Pen tool. Technically, you don’t draw a selection with this method; you draw a path (Drawing Paths with the Pen Tool), which you can then load as a selection or use to create a vector mask (Using Vector Masks). This technique requires quite a bit of practice because the Pen tool isn’t your average, everyday, well…pen, but it’ll produce the smoothest-edged selections this side of the Rio Grande. Head on over to Chapter 13 to read all about it.

Creating Selections with Channels

As you’ll learn in Chapter 5, the images you see onscreen are made up of various colors. In Photoshop, each color is stored in its own channel (which is kind of like a layer) that you can view and manipulate. If the object or area you’re trying to select is one that you can isolate in a channel, you can load that channel as a selection with a click of your mouse. This incredibly useful technique is described starting on Basic Channel Stunts.

Using the Selection Tools Together

As wonderful as Photoshop’s selection tools are individually, they’re much more powerful if you use ’em together.

Remember how every tool discussed so far has an “Add to selection” and “Subtract from selection” mode? This means that, no matter which tool you start with, you can add to—or subtract from—the active selection with a completely different tool. Check out Figure 4-18, which gives you a couple of ideas for using the selection tools together. And thanks to the spring-loaded tools feature—press and hold a tool’s keyboard shortcut to temporarily switch to it, then let go of the key to switch back to the current tool (see the Tip on Tip)—switching between tools is a snap.

As you can see, there are a gazillion ways to create selections, though any selection you make will likely need tweaking no matter which method you use. The next section is all about perfecting selections.

Note

You can also paint selections onto your image by using Quick Mask mode; see Using Quick Mask Mode.

Get Photoshop CC: The Missing Manual, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.