Removing Objects from an Image’s Background

Ever feel the urge to pluck an object out of a photo’s background? For example, maybe you want to take an amazing shot you got of the moon and stick it in another photo. The traditional way of doing that is to make your selection, invert it (Changing and Moving Selections), and then delete the rest of the image. But Elements streamlines this process with another “magic” tool—the Magic Extractor.

Extracting objects used to be a very time-consuming process, often involving expensive third-party plug-ins to make the job easier. Now the Magic Extractor is all you need in most situations. It works much like the Quick Selection tool in that you just give Elements a few hints and it does the rest. When the Magic Extractor is done, your selection is isolated in all its lonely glory, surrounded by transparency and ready for use on its own. Like the Quick Selection tool, this tool does a surprisingly good job—most of the time. To conduct your own experiments, download the practice photo figurine.jpg from this book’s Missing CD page at www.missingmanuals.com.

Tip

You may find it faster to use the Quick Selection tool (Selecting with a Brush) and then invert your selection (as explained on Inverting a Selection) and delete the background area. If that doesn’t work, then it’s time to try the Magic Extractor.

The Magic Extractor has an elaborate dialog box with tools found nowhere else in Elements. (To see it, go to Image→Magic Extractor.) The dialog box includes a toolbox on the left, instructions across the top, a preview of your image, and a set of controls on the right. It looks complicated, but it’s really just a bunch of easy-to-use options for tweaking what you’ve got before Elements extracts your object. Here’s how to use this timesaving tool:

  1. Go to Image→Magic Extractor, or press Alt+Shift+Ctrl+V/Option-Shift-⌘-V.

    Your image appears in the preview area of the Magic Extractor dialog box (Figure 5-14).

  2. If necessary, change the marker colors.

    On the right side of the dialog box are two colored boxes. Usually, you’ll see red for the Foreground brush (the one you use to mark what you want to keep) and blue for the Background brush (the one that tells Elements what to discard). To make the brushstrokes easier to see, you can click the boxes to bring up the Color Picker (Choosing Colors) and choose new colors.

  3. Use the Foreground brush (Removing Objects from an Image’s Background) to tell Elements what you want to extract (Figure 5-16 shows where to find this brush).

    Make some marks on the object you want to keep. You can draw lines, as shown in Figure 5-14, but making dots on your object may work just as well. With a little practice, you’ll soon know what kind of marks you need for each object.

  4. Click the Background brush’s icon (Figure 5-16) and tell Elements what to exclude.

    Use this tool to make some marks in the areas you don’t want Elements to include in your selection.

  5. Click the Preview button.

    The Preview area shows what Elements thinks you want to do. If what you see isn’t even close, click the Reset button at the bottom of the dialog box and start over.

  6. If necessary, use the dialog box’s various tools to adjust the boundaries of your selection.

    For example, if Elements left off an area you want, usually just one click with the Foreground brush is enough to add it. If there are spots missing within the selection, click the Fill Holes button. If you need to get a better view of your work, use the Zoom and Hand tools (both of which are explained in more detail starting on The Zoom Tool).

  7. Fine-tune the edges of your selection if you wish.

    Add a feather (The Magic Wand), defringe (Changing and Moving Selections), or smooth the edges of the selection with the Smoothing brush (explained in a moment).

  8. When you like what you see, click OK.

    If you want to give up and try another method, click the Cancel button instead. Figure 5-15 shows what the Magic Extractor can do.

Just the few marks you saw in Figure 5-14 produce this perfectly extracted selection, all ready to move to another image. (If you look very closely, there’s a tiny bit of the purple background next to his beard, but a click with the Eraser tool [page 418] should fix that in a jiffy.)

Figure 5-15. Just the few marks you saw in Figure 5-14 produce this perfectly extracted selection, all ready to move to another image. (If you look very closely, there’s a tiny bit of the purple background next to his beard, but a click with the Eraser tool [page 418] should fix that in a jiffy.)

Note

Once you understand layers (Chapter 6), you’ll know that the Magic Extractor works only on the active layer. If you want to extract an object without wrecking the rest of your photo, make a duplicate layer (Deleting Layers) and work on that new layer. And in some cases, you may prefer to use a layer mask instead (see Layer Masks).

The Magic Extractor gives you lots of ways to make sure Elements creates a perfect selection. Its dialog box contains a whole set of special tools that are unique to the Extractor, as you can see in Figure 5-16. Each has its own keyboard shortcut (noted in parentheses after the tool’s name in the list below) to make it easy to switch tools while you work. From top to bottom, you get:

The tools in the Magic Extractor’s toolbox make it unbelievably easy to create complex selections and get smooth, professional-looking results when you extract objects.

Figure 5-16. The tools in the Magic Extractor’s toolbox make it unbelievably easy to create complex selections and get smooth, professional-looking results when you extract objects.

Tip

Some of the fine-tuning tools, like the Smoothing brush, work much better if you zoom in pretty close before using them.

To help you see exactly what you’re doing, Elements gives you several ways to adjust the tools and your view of the image. The following settings, which are on the right side of the dialog box, become active only after you click the Preview button:

You also get some very helpful features for making sure your selection is absolutely perfect. These options are on the right side of the dialog box, listed under Touch Up (again, you have to click the Preview button before you can use them):

Tip

If the edges of your selection are ragged but the same color as the area you want, or if defringing alone doesn’t clean things up enough, try the Smoothing brush (Removing Objects from an Image’s Background). Just run it along the edge of your selection to polish it until it’s smooth.

Defringing is a big help in cleaning up the edges of selections.Top: Here’s a close-up of the top of the little mariner’s hat. The matte black background makes the ragged edges of the hat stand out. If you place this image into another graphic, it’ll look like you cut it out with dull nail scissors.Bottom: Here you can see how much softer the edges are after applying some defringing. Now you can place the figurine into another file without getting a cut-out effect; the hat will blend in believably. You don’t need the Extractor to defringe, though; you can use this command on any layer by going to Enhance→Adjust Color→Defringe Layer.

Figure 5-17. Defringing is a big help in cleaning up the edges of selections. Top: Here’s a close-up of the top of the little mariner’s hat. The matte black background makes the ragged edges of the hat stand out. If you place this image into another graphic, it’ll look like you cut it out with dull nail scissors. Bottom: Here you can see how much softer the edges are after applying some defringing. Now you can place the figurine into another file without getting a cut-out effect; the hat will blend in believably. You don’t need the Extractor to defringe, though; you can use this command on any layer by going to Enhance→Adjust Color→Defringe Layer.