Skip navigation
Currently Being Moderated

I need help erasing the background of a photo.

Mar 28, 2012 4:14 PM

Sometimes I do it just fine and other times I can't get it to magic erase the background to save my neck.

 

I've spent 4 hours trying to get this done today......earlier I did it to a photo in 5 minutes.

 

HELP

 
Replies
  • Currently Being Moderated
    Mar 28, 2012 4:38 PM   in reply to idgceo

    You need to post the image so we can determine the best approach.

     

    Ken

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 4:40 PM   in reply to idgceo

    The magic eraser has provision for tolerance setting. Look on the tool's option bar at the top. It is not unlike the magic wand in this regard.

    I prefer to select the foreground, place that on a new layer, and place a replacement background below this.

    With these 2 layers one can make subtle changes to enhance the output.

    Either way is ok if it works for you.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 7:29 PM   in reply to idgceo

    Are you saving the image as a JPG?  Only PNG and TIF files support transparency.

     

    The other thing is the program you're using to view the document into which you paste your image.  If you saved the image with transparency as a PNG, that program might not be capable of dealing with transparency in images.

     

    Ken

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2012 7:43 PM   in reply to idgceo

    The tool to use on this one is Image...Magic Extractor.

     

    Here are the areas I defined in Magic Extractor:

    magic extractor view.png

    And the result:

    extraction 01.png

     

    There are a couple of dark areas in her hair that can be removed with the Magic Eraser, or the Spot Healing brush, or the Smudge tool

     

    Ken

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2012 7:03 AM   in reply to idgceo

    idgceo,

     

    In this type of situation I take a different approach.

    None of the selection tools will make a precise selection around  and in between the hair whisps, esp. the whisps at the top. Perhaps it can be accomplished with a mask, but even that is very tedious with a mouse.

    Consider retaining the foreground, but de-emphasizing the background.

     

    1. Select the foreground with the magnetic lasso tool with feather set to 2px. You can set anchor points, if necessary, with a left click of the mouse, and go back by hitting the delete key on the keyboard.
    2. Once you see the marching ants, create Levels adjustment layer #1

    3. Press CTRL on keyboard and left click the layer mask.
    4. Make the imagle layer active, and go to Select>inverse.
    5. Create Levels adjustment layer #2
    6. Double click the respective layer thumbnails in the adjustment layers to access the levels controls and work the sliders, esp. the background to de-emphasize it.

    179890_450_562_cache_3.jpg

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2012 12:07 AM   in reply to idgceo

    There's another approach to getting a transparent background -- using the selection brushes, but for a subject with areas of wispy hair you'll definitely need to do some handwork.

    1. Use the Quick Selection brush on the woman, alternating between the "add" and "subtract" modes to get a close approximation.
    2. Switch to the Selection Brush tool to refine the selection.
    3. Use Select...Feather with a setting of 1.7 pixels to soften the edges.
    4. Layer...New...Layer via Copy to copy the woman to a new layer with transparency.

     

    Now the most tedious part -- refining the wisps of hair.  Fortunately, there's only a small area that needs the work:
    extraction detail areas.png

    1. Zoom in real tight and remove most of the dark areas by clicking on them with the Magic Eraser tool set to Tolerance:  32, Anti-Alias, and Contiguous. 
    2. Use the Background Eraser with a Tolerance of 14% to further remove dark areas internally and at the outer edges. 
    3. Use the Eyedropper to select a light gray hair colour and the Color Replacement Tool to paint over the wisps of hair to remove most of the green colour cast.
    4. Use the Clone tool at a 4pixel size to draw over some areas of the wisps of hair to further remove the green cast.
    5. Use the Smudge tool at about a 7px size to smooth out the tone in the individual wisps.

     

     

     

    Now comes the fun part of building the final image:

    1. Add two Color Fill layers beneath the extracted image.
    2. Change the colour of the upper Color Fill layer to a dark, somewhat gray blue.
    3. Change the colour of the lower Color Fill layer to a light, somewhat gray green.
    4. Draw a black-to-white radial gradient on the mask of the upper blue Color Fill layer, starting at the lower left and running to the upper right.
    5. Add a new empty layer immediately below the extracted image.
    6. On that empty layer, use Filter...Render...Clouds.
    7. On that clouds layer, use Filter...Blur...Surface Blur with a Radius:  25px and a Threshold:  25px.
    8. Set the Blend Mode of that clouds layer to "Multiply" and the Opacity to 62%.
    9. Refine and balance the overall effect by using the Eraser tool with a hard edge on the extracted image layer to clean up some of the edges, and use the Blur tool to get rid of any obvious hard edges.

     

    The layers wind up looking like this:

    extraction layers.png

     

    And the final image looks like this:

    extraction final.png

     

    That clouds layer gives a nice, blurred "semi-natural" looking outdoors effect to the background -- since the lighting on her face is obviously natural sunlight, the background should also seem to be an outdoors background.

     

    Ken

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2012 6:08 AM   in reply to photodrawken

    Ken, great work in your last example!

    I have one question..before applying the Clouds filter in step 6, what did you set the Foreground/Background colors to?

    I tried both black/white and white/black and there was a slight difference. Or did you use other colors?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2012 11:05 AM   in reply to Mark Sand

    Hi Mark,

     

    The Foreground/Background were the default black/white.

     

    I'm going to do some more experimenting with extracting this portrait.  Just for practice, I want to see if the Background Eraser tool can mean less work.  I also remember several months ago we worked on a problem of dropping out an overblown sky from behind bare tree branches, and in that case a layers mask did not work too well, but maybe in this example with a white foreground image, it changes things....

     

    Ken

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2012 12:56 AM   in reply to photodrawken

    Well, I tried the Background Eraser tool, and it worked great!  I used a Tolerance of 14% and "Discontiguous" Limits.  What I found is that when I got to an area of wispy hair, increasing the brush size to cover the internal areas of background worked like a charm to erase those, even when surrounded by strands of hair.

     

    I still needed to go over the erased edges with the Eraser tool using a hard edge, use the Color Replacement tool as before to remove the green cast from some of the edges and wisps of hair and finally the Dodge tool to lighten some of the areas that were still too dark, but overall it was much less work since I didn't have to manually draw over the individual wisps of hair.

     

    I think the difference will show even at this reduced size:

    Background eraser.png

     

    Ken

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points