Photoshop Not-so-Quick Tip 9– Photoshop’s Extract filter

The following material has been gleaned from our own tutorial, Adobe Photoshop Tip: Attack of the iPod People, but is presented here so that others might benefit from the technique without having to sort through the tutorial in which it was used.

Photoshop’s Extract filter is what is called a “destructive” filter in that it makes nearly irreversible changes to an image …unless you take precautions. As I recommend with all destructive filters, use the Extract filter on a duplicate of the layer you wish to affect. In fact, we’re going to duplicate the subject layer twice in this demonstration. This is because we will eventually use the results of the Extract filter to create a layer mask and, presuming your subject layer is the “Background” layer and also assuming that you’d like to leave it that way, there is no way to add a layer mask to a “Background” layer…they just work differently than regular layers…they represent a flattened image.

Okay, so, duplicate the layer your subject is on (most likely the “Background”
layer) and name
this new layer “Close crop”. Duplicate the Close Crop layer and
arrange its clone above it in the Layers palette (it’s probably already there).
Name this layer “Sacrificial Layer”. Click the “eye” next to the original or Background layer in the layers palette so only the “Close Crop” and “Sacrificial Layer” are visible (it will likely be hard to tell what is visible since all three layers are identical)

Now, make sure the “Sacrificial
Layer” is selected in the Layers palette. Here comes the tricky part:

Disclaimer:

Adobe Photoshop’s Extract filter, like other filters that purport to
isolate objects from backgrounds in photos, is very complicated. Many
image specific problems may arise and some images simply will not work.
For this reason I will not be able to offer any help to people who attempt
this tutorial and encounter difficulty. The methods used here work on
the image I am using and many others I have tried, but your mileage may
vary.

This tutorial is intended for advanced audiences. Some steps may be objectionable
to some users. Discretion is advised.

Go Filter>Extract…

Now you will be faced with the Extract filter interface. The Extract filter
is a “destructive” filter that, with your help, will extract (thus
the name) your subject from its background. What I mean by “destructive”
is that once you have gone through the trouble of getting this filter to do
all it can to isolate your subject and have clicked “Ok”, the
effect it has on the layer is no longer editable. It does not create a layer
mask or clipping path–it deletes pixels. This is why I had you create the “Sacrificial
Layer” and why we are applying the Extract filter to that layer and not
the “Close Crop” or any other layer.

The other scary thing about the Extract filter is that it is darned near impossible
to teach in a text based tutorial like this. So the best
I can do for the time being is to give you the steps involved and the purposes
of those steps:

  1. highlight 20071015 210021 Photoshop Not so Quick Tip 9   Photoshops Extract filterHighlighting:
    The Edge Highlighter tool (looks like a fat felt tip marker) shows Photoshop
    the “border zone.” You’ll draw along the edge of your subject–like
    an outline. But, unlike an outline you need to draw about equally inside the
    edge and outside. The mark you make with this tool tells Photoshop, “Somewhere
    in the stroke of this line is where the edge is.” So if your subject
    has a hazy edge, you’re going to want to use a bigger brush size. But keep
    in mind: the finer the outline the better.
    Make sure your finished outline is a closed shape or that it starts and ends
    at the image’s edge. Also be sure to outline anywhere the background shows
    through within the outer border–such as if your subject has his hands on
    his hips looking heroic, he’ll have background showing through under his arms
    (unless he’s wearing a cape). I have a few areas like this on top of the dancer’s leg where the chains have lifted into the air a bit.
    You can use the Eraser tool (looks like an eraser …duh) to rub out any mistake
    you might make in highlighting. Holding down the Option key while using the
    Edge Highlighter tool also serves as an eraser.
    If you’re feeling really keen, you can try out “Smart Highlighting”
    which promises to follow the edge as you draw and even choose an appropriate
    brush width. It actually does a pretty good job and I highly recommend giving
    it a test drive. Smart Highlighting can be accessed by clicking the checkbox
    on the right side of the Extract filter interface or by holding down the Command
    key while using the Edge Highlighter tool. It can be a great time saver but
    can’t handle fine detail or low contrast edges very well.
  2. Filling: Once you’ve highlighted the border zone,
    you’re going to have to tell Photoshop which side of the border you want to
    keep. Click the Fill tool (looks like a paint bucket) inside the border where
    you want Photoshop to save your subject from its background.
    If the Fill tool spilled paint where you didn’t want it to, just click again
    in the same spot and it will remove the fill. Then you can grab the Highlight
    tool again and draw in the open spot where the paint flowed out and try again.
  3. preview 20071015 210232 Photoshop Not so Quick Tip 9   Photoshops Extract filter
    Previewing:
    Once you feel you have mastered Highlighting and Filling, look down at the
    bottom of the setting on the right hand side of the window and set the Display
    setting to “Other…” A color picker will pop up. Go ahead and pick a nice bright color. Click the “Preview”
    button in the top right corner of the Extract filter window and let Photoshop
    have a crack at extracting based on your instructions.
    Once Photoshop is done attempting to extract your subject form its background,
    you may be completely disappointed with this filter. Is the subject in your
    original photo on a background that is very busy or similar in color to the
    subject? That will make it tough. If so, go to the Preview settings and set
    Show to “Original” and check both the “Show Highlight”
    and “Show Fill” boxes and you’ll be back to before the preview.
    Now check the “Textured Image” box in the Extraction settings above
    the Preview settings you just adjusted. Try clicking the Preview button again
    and see if the results are any better. If not, we’ll just have to make do
    somehow. There is more tweaking ahead still.
  4. Cleanup and Edge Touchup: The Cleanup tool (looks
    like a paint brush on a square with circle inside it) will allow you to softly
    erase parts of the extracted image or, by holding down the Option key, paint
    them back in. You should go around the perimeter of your subject and make
    sure all his or her bits are still intact.
    If the problems lie more with the smoothness of the edges than the accuracy,
    use the Edge Touchup tool (looks like a fat felt tip marker on a square with
    circle inside it) to smooth out the roughness. You can even hold down the
    Command key while using it to smudge the edge to your liking.
    You are free at this stage to jump between the Cleanup and Edge Touchup tools,
    but any tweaking using the Highlighter tool or Fill tool will nullify anything
    you have worked for since clicking Preview. So, work at refining that edge,
    because once you’re done this, click “OK” and apply your extraction.

Man, that was like pulling teeth!

Once your Extraction has applied, Command-Click the Sacrificial Layer and select
the Close Crop layer in the Layers palette. Go Layer>Add Layer Mask>Reveal
Selection. You may now delete the Sacrificial Layer.

Channels 20071015 210447 Photoshop Not so Quick Tip 9   Photoshops Extract filterNow,
with the layer mask of the Close Crop layer selected in the Layers palette,
edit the mask to further refine the extraction. I like using the Smudge tool
to smoosh the edge of the extraction a tiny bit so that they don’t look pixelated.
This process will allow you to edit out any rough spots or refine any details
that you missed or couldn’t get right in the Extract filter window.

You might even want to open the Channels palette, click the eye next to the Close Crop Mask to the “on” position and turn off the eye next to RGB
(or CMYK). This will allow you to look at just the mask and make sure it doesn’t
have any black or white greeblies in places where they don’t belong. The Extract
filter often leaves these things strewn about the highlight area and, though
they may be difficult to see now, they may come back to haunt you later. Once
you’re done, click the image thumbnail of the Close Crop layer.

That’s about it for the Extact Filter. I hope I’ve cleared up a bit of its mystery.