Removing Backgrounds, Part 2: The Magic Eraser Tool

Part 2 of our four-part series shows how the Magic Eraser tool brings the Magic Wand and Eraser tools together

The Magic Eraser tool.

In Part 1 of my Removing Backgrounds series, I used the Background Eraser to remove a blue sky from behind a red lighthouse, which was all the easier because the Background Eraser erases according to color, not value or details. Those details would have made it very tough for the Magic Wand tool to do the same thing or, as I’m about to show you, the Magic Eraser tool, which is what we are working with in this installment of the series.

Read more on Removing Backgrounds, Part 2: The Magic Eraser Tool…

Part 2 of our four-part series shows how the Magic Eraser tool brings the Magic Wand and Eraser tools together

The Magic Eraser tool.

In Part 1 of my Removing Backgrounds series, I used the Background Eraser to remove a blue sky from behind a red lighthouse, which was all the easier because the Background Eraser erases according to color, not value or details. Those details would have made it very tough for the Magic Wand tool to do the same thing or, as I’m about to show you, the Magic Eraser tool, which is what we are working with in this installment of the series.

About The Magic Eraser tool

The Magic Eraser tool is basically the Magic Wand tool with a eraser function attached to it: click to select the pixels of the same color and value as your hotspot (selected by wherever you click the tool) and delete them instantly. It is faster than the Background Eraser in that it will remove a whole swath of background, but it works best when the background has a uniform color and value range. If it doesn’t, the work involved in cleaning up the leftover pixels may not be worth it and you would be better off using a different tool. You’ll see what I mean.

fig1
Figure 1: The Magic Eraser tool’s options.

Take a look at Figure 1, which shows the settings available to the Magic Eraser tool:

  • Tolerance, the tool’s most important setting, controls how sensitive the eraser will be when deleting pixels
  • The Anti-Alias checkbox allows you to turn on or off anti-aliasing, which will smooth the transition between the remaining pixels and the space left behind by deleted pixels
  • The Contiguous checkbox allows you to edit only pixels of that color and value that are in the region sampled by the hotspot; leaving it unchecked will allow you to edit pixels of that color and value wherever they are in the image
  • The Sample All Layers checkbox will allow you to edit pixels no matter what layer they are on
  • Opacity controls how thoroughly the tool erases pixels; a setting of 1% will not erase pixels at all while 100% will delete them entirely

These settings are almost identical to the Magic Wand tool, with two exceptions: only the Magic Wand tool has add, subtract and intersect selection buttons for greater control over selections, and only the Magic Eraser tool has the Opacity setting to control how thoroughly pixels are erased.

Now that we’re familiar with the tool, let’s look at an example of an image it’s not suited for:

Difficulties

fig2
Figure 2: Back to the lighthouse!

This is Figure 2, and readers of the previous Removing Backgrounds installment know that the Background Eraser tool was very useful in removing this particular background. But the Magic Eraser tool works differently, and using it here runs into some difficulties, as you see in Figure 3:

fig3
Figure 3: Streaks through the sky.

Like the Magic Wand tool, the Magic Eraser tool deletes the pixel right under the hotspot and any others with the same value and color. Depending on the Tolerance setting, the tool may take pixels of similar or even borderline-similar value and color or it may take only the pixels that are very similar or exactly the same. In this example I used a Tolerance of 32, which makes for a tool of average sensitivity and is a good starting point for any Tolerance setting. I clicked on the dark blue sky at top and the lighter blue down below, but I am left with streaks of pixels that weren’t similar enough to either color and value to be deleted. Using the Magic Eraser tool to delete everything here is very hard; it seems no matter how many pixels you click on, it’s tough if not impossible to get every single color and value in the background. We should not have used the Magic Eraser tool here (what we should have used, of course, is for another story!).

Once More, With Notre Dame

fig4
Figure 4: Notre Dame Cathedral in Paris.

Figure 4 is a photo I took of the modest backyard at the Cathédrale Notre Dame de Paris. I want to remove the cloudy background, but with the tree branches hanging at the top of the frame it might be worth using one of the eraser tools. The blue-gray color of the roof is similar enough in color to the blue-gray sky that the Background Eraser tool has a hard time, either chopping holes in the roof or leaving haloes around the tree branches. This is an example where the Magic Eraser comes in handy:

Step 1: Select the Magic Eraser tool from the toolbox, set Tolerance to 32 and uncheck the Contiguous checkbox. With the Contiguous box unchecked, we will be sure to get the sky that is enclosed by the cathedral walls and flying buttresses.

Step 2: Click on the sky to remove the background (see Figure 5).

fig5
Figure 5: The Magic Eraser does the trick!

As with the Background Eraser tutorial, I’ve placed a colored layer behind the image layer to illustrate where the sky has now been removed. Figure 6 is a detail of the roof and branches, which shows the roof intact and the branches halo-free!

fig6
Figure 6: The Magic Eraser tool overcomes the Background Eraser tool’s deficiencies.

At this point a new sky can be easily be inserted in the background. For fun, I grabbed the lightning image I was playing with during my Lens Flare tutorial and went gothic:

Step 3: Drag and drop your lightning image onto the Notre Dame image.

Step 4: In the Layers palette, drag the layer with the lightning below the layer with the Notre Dame image. The lightning will move behind the cathedral. Move and transform the lightning image for proper placement (Figure 7).

fig7
Figure 7: Looks like a scene from Ghostbusters…..

Good, but the cathedral’s lighting is way off now. No problem, we’ll use the same trick we learned in the Lens Flare tutorial, but with a twist:

Step 5: Create a new layer and fill it with a dark blue-gray (I used 29R/61G/125B). We used black in the Lens Flare tutorial, but that was because we wanted it to disappear entirely in the following steps. Here we will use the color to change the color and lighting of the whole image.

Step 6: Select Filter->Render->Lens Flare… and create your lens flare. If you have problems, go to the tutorial.

Step 7: Set the Layer Mode to Vivid Light.

fig8
Figure 8: Whoa!

Now that’s a photo opportunity: lightning strikes the Notre Dame Cathedral! And it was the Magic Eraser tool that made it possible to remove that background quickly and easily.

Our next installment in the Removing Backgrounds series will come on Thursday, November 17, when I will take a look at a tool of a different type, the Magnetic Lasso tool. It was one of the big new features of Photoshop 6, but never really caught on in production environments as far as I can tell, due to its finicky behavior. But once you set the options properly and get used to handling it, you will find it a useful tool when removing backgrounds.

SERIES INDEX

Part 1: The Background Eraser Tool
The Background Eraser tool removes backgrounds according to color, which makes it useful for images where the foreground object and background object have different color hues.

Part 2: The Magic Eraser Tool
The Magic Eraser tool is a combination of the Eraser and Magic Wand tools, which makes it valuable in situations where backgrounds have a uniform color and value.

Part 3: The Magnetic Lasso Tool
The Magnetic Lasso tool seeks edges with high contrast, making it a tool that can snap to a foreground object’s edges quickly in order to remove the background.

Part 4: The Extract Filter
The Extract filter is a complex tool for eliminating the toughest backgrounds, including those dealing with hair, fur, leaves and blurred edges.

Subscribe to the Discussion Surrounding This Article
*Enter Your Name (Required)
*Enter Your Email Address (Required and Kept Confidential)
Enter Your Web Address (Optional)
An asterisk (*) in the field name indicates required information.

We reserve the right to edit or delete comments for any reason.

Suggested Links

domain registration

Worldlabel is a source for equivalent Avery® labels sizes and free label templates for designing.