The Background Eraser is one of many Photoshop tools that's a little tucked away, and many people don't even realise it's there. As it turns out, this is just one of a few useful options hiding under the Eraser Tool (you can access these options with a click and hold action on the Eraser Tool). These have all been here since before Creative Suite, but as we know, Photoshop is good at hiding handy features.
The name of the tool is slightly misleading. In reality, it's an intelligent eraser that allows you to define the areas you want removed by colour. As such, it's primarily used for removing backgrounds like skies, but is applicable in various chroma-masking situations. I almost always use it to get a "render" that I can Control-Click to apply as a mask to a duplicate layer, and clean up the edges. It's faster and more accurate than the lasso or quick select. Let's get started.
1. The Brush
Whether or not you have crosshairs turned on in cursor preferences, the background eraser contains one. This crosshair is the sampling input of its colour analysis engine. You keep the crosshair over the colour you want to erase, for instance a sky in the background, and the brush takes that colour, applies the user settings to it, and erases the appropriate pixels within the set radius.
It's adjustable just like a regular brush, so you can set the shape according to your image, to achieve the best results. While it's generally clearer what you're doing when using a hard brush, for some soft objects you're masking around may require a soft brush.
You can actually set the type of sampling you want from the crosshair right next to the brush dropdown. There are three options.
The first is the default setting called Continuous. This continually samples the colour under the crosshair as you go along. Handy for graduated and detailed backgrounds, but you have to be careful not to let the crosshair slip onto your subject.
Next in option is called Once. This samples the colour at the first point you click, and uses only that for the entire stroke. This is useful for subjects with light spill, as it gives you more control over exactly what you're working on at each point along an edge. It also makes backgrounds which are fairly uniform, like blue or grey skies, extremely easy to remove.
The last option is Background Swatch, which does exactly what it says on the tin. Set your background colour to the colour you want to erase. You can either click on the background swatch and use the colour picker's sampling tool, or what I find much faster is just to hit X, hold Alt and click on your background, then hit X again.
The tolerance setting dictates how far beyond the individual sampled colour the algorithm is allowed to erase. It defaults at 50%, and for well-defined subjects like green trees on blue sky, this is usually fine. When working with people on a grey background where there's a grey spill onto the skin in places, this won't be so good and you'll probably end up around 8-10%. Such a low tolerance causes the erasing to get noisy, as only certain, non-adjacent pixels within a region fall within the low threshold.
You can set the tolerance higher by checking the Protect Foreground Color box. This allows you to set your foreground swatch colour to your subject's colour, which tells the algorithm the hues it should be avoiding. This then allows the tolerance to be raised to collect more background pixels, but without spilling onto your foreground's colour. You may need to update the foreground colour several times as you move around the edges of a subject.
Speaking of the edges of the subject, let's go back to that little dropdown menu I bypassed called Limits. It has three options: Contiguous, Discontiguous, and Find Edges. These all have their own uses and may even all be applicable to a single image, depending on your subject.
Contiguous is the default, and is used when your subject-background boundary is a single, clearly defined line. There's no background peeking through parts of your subject, no overlapping wisps of hair, just a straight line. Selecting Contiguous tells the algorithm to only delete areas of colour that are touching each other, and is useful for not deleting portions of subject due to loose tolerance settings.
Discontiguous is the opposite. Use it for blowing hair, leaves and branches, anything where the background is broken up by the subject. Once you have the tolerance settings dialed in, this can work wonders on busy subjects that would be impossible to mask by hand.
Find Edges does just that. It's mainly for contiguous subjects, but where you're having difficulties erasing because, say, the background spills onto the subject and allows a small contiguous path inward. This option tells Photoshop to find the edges of the subject and take them into account when deleting.
5.See the Background Eraser in Action
In this two-minute example video, I show a quick way of pulling your subject from a not-so-good studio background. Because of the grey spill onto the subject, I have to use the sampling tool multiple times. I start the masking process to use Refine Edge or Refine Mask on, and apply it to a duplicate Smart Object layer.
Note that I use different Limits and Tolerance settings for different sections of outline, depending on the complexity or tonal range of the image. Once I have the subject more or less outlined, I finish it off with a regular eraser.
Questions? Comments? Hit up the comments below!