Extract Tool/Change Backgrounds

ruttrutt Registered Users Posts: 6,511 Major grins
edited March 18, 2005 in Finishing School
This is one of my most common problems. I get a good shot but there is something ugly or just distracting in the background. It happens all the time with portraits, macro, sports, you name it. Here is an example form yesterday. I wanted a shot sort of like this:

3346179-L.jpg

But notice that the buds are not all in focus. So I stopped down and by the time all the buds were in focus, I got this:

3346142-L.jpg

I want to get the depth of field of the second shot on the branch and buds, but the depth of field of the first shot for the background.

Use my images if you like, or use your own. My images are linked to their full sized originals, so if you do use my images, you might as well work with the full sized images.

[There! I hope that's more on target for the majority of people.]
If not now, when?
«1

Comments

  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 12, 2004
    Hey, come on, guys
    I thought this would be very popular. Am I the only one who ends up with ugly stuff in the background and has trouble getting DOF right? I thought this would be a universal problem.
    If not now, when?
  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 12, 2004
    I'll bite,

    Here's one from last weekend that I like. The kart came out the way I wanted, but the background sucks.


    3396643-M.jpg

    Here's my attempt to fix it.....

    3433907-M.jpg

    I'm not sure if that is better or just as bad in a different way!

    Hutch
  • cletuscletus Registered Users Posts: 1,930 Major grins
    edited April 12, 2004
    hutchman wrote:
    Here's my attempt to fix it.....

    3433907-M.jpg

    I'm not sure if that is better or just as bad in a different way!

    Hutch
    I like it thumb.gif
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited April 12, 2004
    This is exactly the reason I keep photos like this around:

    2004-04-10.jpg

    Need some blue sky background? Just clone that right in... :D
    Erik
    moderator of: The Flea Market [ guidelines ]


  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 12, 2004
    DoctorIt wrote:
    This is exactly the reason I keep photos like this around:

    2004-04-10.jpg

    Need some blue sky background? Just clone that right in... :D
    I have a folder on my hard drive full of skies and autumn forests and brick walls just to use as backgrounds when I need them. I keep a little note in my head when I am out shooting to look for good potential backgrounds to grab for use later. Great minds think alike DoctorIt......lickout.gif
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 12, 2004
    That's a good idea. Whodathunk?

    Hutch
  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 12, 2004
    hutchman wrote:
    That's a good idea. Whodathunk?

    Hutch
    And cheap too!!Laughing.gif
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 12, 2004
    I learn something new here every day. That's why I really enjoy this forum.

    What gets me just a little is when it is something as obvious as this little trick and I did not think of it myself. I wonder if I can blame it on 1/2 timers?

    Hutch
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 13, 2004
    What am I doing wrong?
    I tried attacking my first image of the branch with buds and the all-too-infocus background.

    Here is as far as I got:

    3452755-L.jpg

    (Image is a link to original.)

    This always happens to me with this sort of image manipulation (selective as opposed to global.) When it gets to be time to work near the edges of things, it just becomes too hard to paint accurately enough. The only exception to this is when there is a strong enough color difference to make the magic wand or Select->Color Range work.

    I think I had sort of a good idea:
    1. Make a duplicate layer
    2. Select background layer
    3. Clone some extra blue sky all around the image (neatness doesn't matter)
    4. Filter -> Blur -> Gaussian Blur (maximum)
    5. Now we have a nice blurred background and because of 3, not too dark
    6. Select duplicate layer and add a white layer mask (thanks, Pathfinder)
    7. Now I can paint out the infocus background (with black) allowing the blurred background through.
    8. As per Pathfinder, I used a soft brush near the edges. I can paint in wite to unde places where I blurr something I don't want to.
    So, Is this just incredibly painstaking work and I just didn't have the patience to do what had to be done? Or am I missing some trick that everyone else knows?
    If not now, when?
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited April 13, 2004
    rutt wrote:
    ...

    This always happens to me with this sort of image manipulation (selective as opposed to global.) When it gets to be time to work near the edges of things, it just becomes too hard to paint accurately enough. The only exception to this is when there is a strong enough color difference to make the magic wand or Select->Color Range work.

    I think I had sort of a good idea:
    1. Make a duplicate layer
    2. Select background layer
    3. Clone some extra blue sky all around the image (neatness doesn't matter)
    4. Filter -> Blur -> Gaussian Blur (maximum)
    5. Now we have a nice blurred background and because of 3, not too dark
    6. Select duplicate layer and add a white layer mask (thanks, Pathfinder)
    7. Now I can paint out the infocus background (with black) allowing the blurred background through.
    8. As per Pathfinder, I used a soft brush near the edges. I can paint in wite to unde places where I blurr something I don't want to.
    So, Is this just incredibly painstaking work and I just didn't have the patience to do what had to be done? Or am I missing some trick that everyone else knows?
    I have the same problem with edges... If the select color range doesn't work, i end up with the same problems as you have there, even with all the layer masks. the magnetic lasso sometimes works well, but not always.
    ear.gif
    Erik
    moderator of: The Flea Market [ guidelines ]


  • ShakeyShakey Registered Users Posts: 1,004 Major grins
    edited April 13, 2004
    Do you have a node edit device? that way you use points to lasso your mask.
    It allows more precision on intricate shapes.?

    I know my editing software (corel) has it, yours might be named differently. In a nutshell you put points down and it just connects the dots sort of.


    The hardest thing I find is hair, it is difficult not making the person look like they are wearing a "Hair Cap" rolleyes1.gif
    Tim
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited April 13, 2004
    Shakey wrote:
    Do you have a node edit device? that way you use points to lasso your mask.
    It allows more precision on intricate shapes.?

    I know my editing software (corel) has it, yours might be named differently. In a nutshell you put points down and it just connects the dots sort of.


    The hardest thing I find is hair, it is difficult not making the person look like they are wearing a "Hair Cap" rolleyes1.gif
    Tim
    I think that sounds like the magnetic lasso (PS CS) - it has all sorts of settings that I haven't mastered, heck, haven't even been able to try them all out.
    Erik
    moderator of: The Flea Market [ guidelines ]


  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 13, 2004
    John,

    If you are using PS 7 or CS, you can use the Extract Tool under Filter. It works to pull an item out of the background. The only thing you have to watch, is it likes quite a bit of contrast to work.

    I tried it with your image.

    I extracted the buds and branch.
    Gausian Blurred the background.
    Color corrected the image using the black selection tool on levels.
    Sharpened the extracted layer a little.
    Added another adjustment layer for a +5 saturation addition.

    3465583-M.jpg


    This is the result. Using the extract tool and all adjustments maybe took 7 minutes.

    Hutch
  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 14, 2004
    hutchman wrote:
    John,3465583-M.jpg

    If you are using PS 7 or CS, you can use the Extract Tool under Filter. It works to pull an item out of the background. The only thing you have to watch, is it likes quite a bit of contrast to work.

    I tried it with your image.

    I extracted the buds and branch.
    Gausian Blurred the background.
    Color corrected the image using the black selection tool on levels.
    Sharpened the extracted layer a little.
    Added another adjustment layer for a +5 saturation addition.

    This is the result. Using the extract tool and all adjustments maybe took 7 minutes.

    Hutch

    Hutch -

    I liked what you did - I usually have little affection for the extract filter/tool - I find it tedious to use the repair tool and all after extracting - usually I just use the magnetic lasso or the color select or the pen tool - But you are absolutely correct that for this irregular, organic, multicolored branch the extract tool works best - so following your lead I created a duplicate layer and then extracted the branch and then Gaussian blurred the background layer. But why accept that blurred red and blue background -

    Like DoctorIt said - drag out your files of backgrounds and UPGRADE!
    So I opened a new file of a sky in New Mexico and brought a little of the SouthWest to Bostons branch and ended up with this via the clone tool




    3470029-L.jpg
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 14, 2004
    Thanks, Hutch! That was the secrect weapon I was missing. It took me more than 10 minutes, but I did get a good result in about an hour. Then I took a middle course between what you did and what Pathfinder did. I cloned more of the blue section over the red brick in the underlying image before gausian blurring it. I used less blur this time to retain some of the branch suggestion, but because of the cloning, the backgkround came out much less red. On the other hand, the light and color matches, so it doesn't look like an obvious photoshop cut and paste job.

    3475879-L.jpg

    Anyway, I guess this assignment accomplished it's mission in so far as this image is concerned. Let's try to cook up a new one.
    If not now, when?
  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 14, 2004
    Woo Hoo!

    Two more ways to skin a cat!

    Hutch
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 14, 2004
    It's sort of beating a dead horse, but here is one more version. I realized that I had missed a trick. So I steepend the A and B channel curves in LAB to get better colors on the branch and buds (but didn't steepen the background.) I thought there was no hope for this image, but now I think it's pretty good. Thanks again Hutch.

    3476482-L.jpg
    If not now, when?
  • lynnmalynnma Registered Users, Retired Mod Posts: 5,207 Major grins
    edited April 14, 2004
    pathfinder wrote:
    Hutch -

    I liked what you did - I usually have little affection for the extract filter/tool - I find it tedious to use the repair tool and all after extracting - usually I just use the magnetic lasso or the color select or the pen tool - But you are absolutely correct that for this irregular, organic, multicolored branch the extract tool works best - so following your lead I created a duplicate layer and then extracted the branch and then Gaussian blurred the background layer. But why accept that blurred red and blue background -

    Like DoctorIt said - drag out your files of backgrounds and UPGRADE!
    So I opened a new file of a sky in New Mexico and brought a little of the SouthWest to Bostons branch and ended up with this via the clone tool




    3470029-L.jpg
    Hi Path,
    Can you elaborate a little on this extract thing? I always have trouble making a background look natural and this looks really good to me.. I usually select or magic wand and then paste but it never looks right.. I'd love to know the details of this look..
    thanks
    Lynn
  • DoctorItDoctorIt Administrators Posts: 11,951 moderator
    edited April 14, 2004
    hutchman wrote:
    John,

    If you are using PS 7 or CS, you can use the Extract Tool under Filter. It works to pull an item out of the background. The only thing you have to watch, is it likes quite a bit of contrast to work.

    I tried it with your image.

    I extracted the buds and branch.
    Gausian Blurred the background.
    Color corrected the image using the black selection tool on levels.
    Sharpened the extracted layer a little.
    Added another adjustment layer for a +5 saturation addition.



    Hutch
    Awesome! Any tips on the Cleanup and Touchup tools within the extract function? Thats where it got tricky and fuzzy, but even with just a quick shot at it using the smart highlight, it gave better results than the magnetic lasso.

    Lynn - its real easy: Filter > Extract. Brings up the photo in its own new little window with special tools on the side. Pretty intuitive. May only be in 7 or CS though...
    Erik
    moderator of: The Flea Market [ guidelines ]


  • cletuscletus Registered Users Posts: 1,930 Major grins
    edited April 14, 2004
    DoctorIt wrote:
    Lynn - its real easy: Filter > Extract. Brings up the photo in its own new little window with special tools on the side. Pretty intuitive. May only be in 7 or CS though...
    nod.gif

    The thing to watch out for (as pathfinder pointed out) is that the Extract tool is destructive, meaning that once you run it the stuff outside of what you extracted is gone! So as a rule of thumb, duplicate the layer you want to extract from before running the Extract filter.
  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 14, 2004
    cletus wrote:
    nod.gif

    The thing to watch out for (as pathfinder pointed out) is that the Extract tool is destructive, meaning that once you run it the stuff outside of what you extracted is gone! So as a rule of thumb, duplicate the layer you want to extract from before running the Extract filter.
    Lynn -

    Cletus is right that you need to duplicate your background layer before selection because once the object is extracted the rest of the frame is bare - as in the cupboard is bare - empty!!

    My problem with the extract tool is that if you do not use the repair tool in the preview mode prior to finalizing the extraction, the edges can be rough an have a motheaten look. I find, after using the green marker around the edges where I want to extract ( using smart selection box checked ), that I need to carefully and repeatedly use the repair tool over the eges in the preview box before I finally extract.

    Also even after extraction I frequently hit ctrl-J to duplicate a layer of what I extracted to get the borders the way I want them. Don't ask me why that cleans up the borders - I have no idea - it just does - it's magic probably. lickout.gif

    That is why I prefer to select with the magnetic lasso or the pen or by color selection IF possible. But for this branch with the organic irregular shape and various colors that match the background, I found the extract tool for all its faults was the better tool to use.lickout.gif

    Rutt - were you implying-saying that my image looks like a photoshop paste job - that it does not look real to your highly trained eye? Laughing.gif

    Could be - I just liked it better than the Gaussian blur of the sky and the brick. I looked to check on the directionality of the light on the two layeres I combined and did not see an obvious defect in lighting shadow or direction - did I miss something there?
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 14, 2004
    pathfinder wrote:
    Lynn -

    Rutt - were you implying-saying that my image looks like a photoshop paste job - that it does not look real to your highly trained eye? Laughing.gif

    Could be - I just liked it better than the Gaussian blur of the sky and the brick. I looked to check on the directionality of the light on the two layeres I combined and did not see an obvious defect in lighting shadow or direction - did I miss something there?
    It looked all too real to me. Surreal, in fact. The sky was so bright and we are looking down on the clouds. It was beautiful, but seemed improbable to me (perhaps because I knew the real setting of the branch on an early spring morning in New England.) I do agree that the red in the background ends up making an ugly blur. So I tried to fix this. In the end, de gustibus non desputem est.
    If not now, when?
  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 14, 2004
    rutt wrote:
    It looked all too real to me. Surreal, in fact. The sky was so bright and we are looking down on the clouds. It was beautiful, but seemed improbable to me (perhaps because I knew the real setting of the branch on an early spring morning in New England.) I do agree that the red in the background ends up making an ugly blur. So I tried to fix this. In the end, de gustibus non desputem est.
    I agree that the sky is too bright. I should have desaturated it a little or boosted the branch color saturation - just sloppy work done in a hurry.

    I am surprised that you feel you are looking DOWN at the clouds since I shot them looking UP from ground level in the late afternoon and the horizon is just below the edge of the frame. Puzzling......

    I thought the sky was dramatic that afternoon and collected the image just to save as a new backgroung like I did for your branch shot. And I thought the light was diffuse enough to not clash with a foreground with diffused lighting.

    I did not take the time to clone out the shadow on the branch at its left as I should have either.

    Thank you for your opinion John, I appreciate it. Sometimes it is hard for me to see these kind of things.
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • wxwaxwxwax Registered Users Posts: 15,471 Major grins
    edited April 14, 2004
    pathfinder wrote:
    Hutch -

    I liked what you did - I usually have little affection for the extract filter/tool - I find it tedious to use the repair tool and all after extracting

    One tip I always forget is to go into channels and look for a version with the most contrast, then extract/select - much easier.
    Sid.
    Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam
    http://www.mcneel.com/users/jb/foghorn/ill_shut_up.au
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited April 14, 2004
    pathfinder wrote:
    I thought the sky was dramatic that afternoon and collected the image just to save as a new backgroung like I did for your branch shot. And I thought the light was diffuse enough to not clash with a foreground with diffused lighting.

    I did not take the time to clone out the shadow on the branch at its left as I should have either.

    Thank you for your opinion John, I appreciate it. Sometimes it is hard for me to see these kind of things.
    No problem. That's the point of this kind of forum, to get the benefits of constructive criticism.

    Your treatment of the branch was very striking and dramatic. It shows how cleanly the extract filter (which I really didn't know about) can work. And your sky is beautiful.

    Too beautful I think. It overwhelms the branch, which is a very delicate image and not brightly colored. It would be great with a girl on a motorcycle in the foreground.
    If not now, when?
  • hutchmanhutchman Registered Users Posts: 255 Major grins
    edited April 14, 2004
    DoctorIt wrote:
    Awesome! Any tips on the Cleanup and Touchup tools within the extract function? Thats where it got tricky and fuzzy, but even with just a quick shot at it using the smart highlight, it gave better results than the magnetic lasso.
    Thanks,

    I did use both the cleanup tool and the edge touchup tool. The edge touchup tool can be used in conjunction with the alt key to move the edge back to the original location, if the extraction is not very accurate. I had to use this feature several places.

    Hutch
  • pathfinderpathfinder Super Moderators Posts: 14,694 moderator
    edited April 14, 2004
    wxwax wrote:
    One tip I always forget is to go into channels and look for a version with the most contrast, then extract/select - much easier.
    Actually waxy I did take a quick look at channels in RGB and LAB to see if one had a better contrast to select with, but did not really see one that stood out - so I just used the extract tool and like I told Hutch - I learned something - that for highly irregular shapes with lots of fine detail and no real color distinction - the extract tool can be the better tool to use. I still think the other selection tools are easier to use IF there is a contrast of some type to clue on.
    Pathfinder - www.pathfinder.smugmug.com

    Moderator of the Technique Forum and Finishing School on Dgrin
  • ruttrutt Registered Users Posts: 6,511 Major grins
    edited May 9, 2004
    Putting it to use
    This thread was great and today I was able to put the knowledge to use in a most satisfying way.

    Before:

    4060582-M.jpg

    After:

    4069006-M.jpg
    If not now, when?
  • cletuscletus Registered Users Posts: 1,930 Major grins
    edited May 9, 2004
    rutt wrote:
    This thread was great and today I was able to put the knowledge to use in a most satisfying way.

    Before:

    4060582-S.jpg

    After:

    4069006-S.jpg
    Nice work rutt! thumb.gif
  • lynnmalynnma Registered Users, Retired Mod Posts: 5,207 Major grins
    edited May 9, 2004
    Extraction tool - I cropped this model for dignity's sake (not that there was anything much wrong with it) I just wanted to show my extraction from garage to snow scene..
Sign In or Register to comment.