They're here! More Muvipix.com Guides by Steve Grisetti!
The Muvipix.com Guides to Premiere & Photoshop Elements 2024
As well as The Muvipix.com Guide to CyberLink PowerDirector 21
Because there are stories to tell
muvipix.com

Separating a Subject from the Background in Photoshop

Video / Image editing, advanced techniques, computer settings, third party software, shortcuts, workarounds ... share your tips and tricks here.

Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Wed Dec 02, 2009 7:37 pm

People often need to separate an subject in an existing digital image to either use it without its background, or to composite it into another image. This is a very common operation in Photoshop (PS) and Photoshop Elements (PSE). It’s easy to do, but one should first plan their approach and then let the subject dictate which Tools that will be used, and when/where to use them. As with most operations in PS, one can go about this in different ways and with different Tools. That is one of the most powerful aspects of PS/PSE.

One common use of this technique for Video is to separate a subject from the background, and then use another background. The illusion of 3D can be easily obtained, if one Keyframes a zoom on the subject, while holding the background stationary. In that case, I like to add a little Effect>Gaussian Blur to the background and maybe even drop its Contrast down just a bit. However, the photograph used as the background will dictate exactly how you handle it.

In this example, we will take an image of person, photographed against a varied background - no green screen, or coved background here. There are areas, where the background shows between arms, and legs, so there will be little areas of this background that is cut off from the main areas of the background. What we will be doing is creating a "Mask," which will be both an Alpha Channel, and used as a Layer Mask - a wonderful feature in Photoshop.

Our image came to us as a nice, high-rez TIFF. My steps will reflect work in PS. PSE is similar, but some interpolation might be required.

1.) Open your image in PS, and Dbl-click on the Background Layer in the Layers Palette. Accept the default to convert it to a regular Layer with whatever name you want, say "Chris_Image." This is very important, as one cannot add a Layer Mask to a Background Layer, and only to a regular Layer.

2.) Use the Lasso (or Magnetic Lasso) to do a rough outline Selection of the image. I set the Feather to 0, as this is just a starting point. [Note: one could use the Pen Tool to do a Path around the subject too, and then convert that into a Selection from the Paths Palette.]

3.) If you have Selected the background, then press Shift+Ctrl+I to invert this Selection

4.) Choose Selection>Save Selection and choose Layer Mask for Chris_Image Layer. Note that you will need to access the little drop-down menu to get this, and it is located right above the name text block, Channel: and it will show New, until you click the little down-pointing arrow to get the drop-down.

5.) In the Channels Palette, chose the Layer Mask Chris_Image [Very Important]. Do not click on Visibility (Eyeball) for the Channel. Leave it OFF, so that you can see the effects of painting-in and painting-out that Mask (the Channel). Note: When you are working on an Alpha Channel/Mask, the colors will switch to Black and White. Black paints-in the Mask, and White paints-out the Mask (basically Erasing it, but keeping the user in the same screen/work mode, without need to change anything). One can toggle the Black and White with the X key. To me, this is a much more simple workflow, that even keystrokes between Brush and Eraser, especially as I want about the same Brush for painting-in and painting-out.

6.) Hit the B key for the Brush Tool and choose a Brush that is semi-hard, not fully hard, but not fully soft either. If you do not have one handy, you can tailor an existing Brush to suit. Work slowly and at a high magnification. If you need to correct a brushstroke, remember Ctrl+Z, or hit the X key and your Brush becomes an eraser.

7.) Use the [ and ] keys to adjust the size of the Brush and use the X-key to switch between black and white to paint-in, or paint-out on the Layer Mask. Use the Magnifier to get in close and work slowly.

8.) Go to Selection>Modify>Smooth, and set the Sample Radius to say 3 pixels. This should pick up any missed, stray pixels and eliminate them. At this point, I turn OFF the R G B Channels, and look at only my Layer Mask for Chris_Image. You’re now looking at a gray-scale image in blacks and white. Use the Magnifier to zoom in, and study the areas, especially where we did the work in Quick Mask Mode with our Brush. Look for gray pixels, or little “holes” in our Mask. This is exactly how it was done in the analog days. One had an amber- lith mask that was photographed onto lith film (pure black or white) and one looked for pinholes. These were opaqued, before the mask was used to print our image onto a sheet of transparency film in the darkroom. I like to invert my Mask and look at it where the areas that were in black, are now in white. Look again. Everything needs to be clean.

9.) Last touch might be to add a touch of Gaussian Blur (Filter) to the Layer Mask, but this is like salt in soup - to taste. To do this most effectively, hit the Q key for Quick Mask Mode, and then with that Channel active, use Filter>Gaussian Blur, and choose a low number. Hit the Q key to exit Quick Mask Mode to exit.

10.) At this point, we can then Save our Layered Image in a format that includes Transparency. The .PSD format (PS’s and PSE’s native format) is a good one. TIFF and PNG will work too. GIF includes Transparency, but reduces the image to 256 colors. For artwork, that is often OK, but for continuous-tone photographs, it is not a viable choice. Note that JPEG will not Save with Transparency.

Above, I mentioned the Pen Tool and the creation of a Path to be converted into a Selection. One of the beauties of this method is that curves can be covered beautifully with the Bezier Curves in the Pen Tool. However, it takes a bit of practice to learn the Pen Tool, so the Lasso will likely go quickly. To me, the precision of the Bezier Curves saves work in Quick Mask with the Brush later on. That choice is yours. Also, if ones HDD real estate is running low, an image where the Mask is converted from a Path, or is created from a Path, will be smaller, than including the full Alpha Channel of the Mask. Just something to consider.

Hope that this helps you, when you need to “knockout” (the graphics term for separating the subject from the background) a subject.

Good luck,

Hunt

PS - just to clarify things a bit, the word "background" is used for two separate items. First, there is the Background Layer, which is a Locked Layer, when an image is Opened in Photoshop. Many editing operations cannot be performed on it. To do our Masking, we need to Unlock it, and that is why we Dbl-click on it to turn it into a regular Layer. Note the italics, as that is how it appears in the PS Layers Palette. Then, we talk about the background, which is the area of the image that we are Masking out. Note: this use is lower-case, not italicized and the word Layer is not used with it. This is that area of pixels, that we are going to remove from view with our Mask.

[Edited 02/21/10 to add some clarifications, per e-mail from Curt Y in the Adobe Forum - thanks Curt]
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Wed Dec 02, 2009 7:45 pm

Here's a link to an article on knocking out wavy, or curly hair in your subject:
http://www.associatedcontent.com/article/4828/photoshop_tutorial_isolating_fuzzy.html?cat=46

Also, as mentioned, there are almost always other ways to do something in Photoshop. The Extract Filter can be very helpful, as well.

Good luck,

Hunt
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Bob » Wed Dec 02, 2009 8:27 pm

While many of the tools mentioned are in Photoshop but not in Photoshop Elements (pen tool, channels, quick mask, extract filter, etc.), Photoshop Elements does have other ways to form a selection and cut out the subject. And, as Bill has pointed out, you can do some interesting things in video using cutouts.

The Photoshop Extract filter is no longer installed by default, although it is still included on the installation DVD as an extra. Topaz labs has recently introduced a plugin for extractions similar to Extract that works in Photoshop Elements as well as Photoshop. http://www.topazlabs.com/remask/. You might want to take a look at it.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA

Re: Separating a Subject from the Background in Photoshop

Postby rusty » Thu Dec 03, 2009 11:27 am

Hunt, thanks so much for this. I have been contemplating this for a while and will shortly be starting a project where I want to use it. Your timing couldn't have been better! :-5
Russ
User avatar
rusty
Frequent Contributor
Frequent Contributor
 
Posts: 232
Joined: Mon Nov 17, 2008 4:18 pm
Location: North Vancouver, BC, Canada

Re: Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Fri Feb 19, 2010 7:57 pm

Bob,

If you have a moment, I'd really like to have an addendum to this article just for PSE. Though I do have Steve's book on PSE & PrE 7, I have to admit that I have never used PSE, though I have given it as a gift. I know that much is similar, but do not know the real differences. Any input for PSE users would be greatly appreciated.

Thanks,

Hunt
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Steve Grisetti » Fri Feb 19, 2010 10:30 pm

Well, there are two main differences between Photoshop and Photoshop Elements, Hunt.

1) Photoshop Elements has a supposedly simplified interface. Mostly that means that a lot of functions are in different places -- which drives me crazy when I'm working with one program during the day and the other at night! And, of course, many high-level tools (like the ability to create Actions or Layer Sets) don't exist in the Elements version.

2) The color mode options are reduced in Elements. The full version of Photoshop includes the ability to work with, among other modes, duotones and CMYK color -- both of which are useful if you're prepping photos and graphics for print.
HP Envy with 2.9/4.4 ghz i7-10700 and 16 gig of RAM running Windows 11 Pro
User avatar
Steve Grisetti
Super Moderator
Super Moderator
 
Posts: 14439
Joined: Sat Feb 17, 2007 5:11 pm
Location: Milwaukee, Wisconsin

Re: Separating a Subject from the Background in Photoshop

Postby Bob » Sat Feb 20, 2010 4:29 am

If you have a moment, I'd really like to have an addendum to this article just for PSE.


Sure, I'll try to get to it soon. The steps will need to be different as PSE does not have a pen tool, does not natively provide for adding layer masks, does not have a channels palette, and does not have Quickmask.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA

Re: Separating a Subject from the Background in Photoshop

Postby Gerlinde » Sat Feb 20, 2010 11:54 am

PSE has the Magic Extraction tool, which works exceptionally well. In PSE7 it can be found under >Image>MagicExtraction..... It needs a little patience, depending on the picture, but your result can be well worth it. There are also a lot of add-on little tools , that give you things like masks, available here:http://www.cavesofice.org/~grant/Challenge/Tools/index.html
A) i7-3930K 3.2GHz (3.8GHz Turbo), 32GB DDR3-1600, SSD 256GB, 2x1TB+2x2TB Seagate Barracuda (72krpm), Geforce GTX 550 Ti (1GB), Win10 Pro 64-bit
B) Sony Vaio i7-3632QM,12gb DDR3-1333MHz, GeForce® GT 640M LE (2GB), 750GB (7200rpm), Win10 Pro64-bit
User avatar
Gerlinde
Moderator
Moderator
 
Posts: 1018
Joined: Fri Jun 22, 2007 3:45 pm
Location: San Diego,CA

Re: Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Sat Feb 20, 2010 5:42 pm

Thank you both for your input. I wish that I could address this for PSE users, but do not have that program - just PS.

Your comments will definitely help others, and I greatly appreciate them. The more details, the better.

Thanks,

Hunt
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Sat Feb 20, 2010 6:15 pm

Steve,

You say that Layer Sets do not exist in PSE. What happens when one Opens a DVD Menu in PSE? All Buttons are Layer Sets.

I guess that it's time for me to pick up a copy of PSE for myself. I've given several as gifts to friends, who did not need, nor did they want, PS. Next copy stays here! It's time for me to learn the differences, so that I do not confuse others. I do try to give mention to my work being done in the full PS, but I assumed that the versions were a bit closer, than they probably are. I thought that the biggest differences were Layer Masks, and CMYK support, but think I am wrong.

Thanks,

Hunt
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Gerlinde » Sat Feb 20, 2010 6:51 pm

You can open DVD templates in PSE without a problem. It keeps all the layer sets intact and you can edit them as you like (but I have never done that) . You only can't create layer sets. I use version 7. Here is a screen capture Image

PSE is really very powerful, but you have to get used to do things differently. The best way to learn all the tricks for PS Elements is to sign up for a membership at http://www.photoshopelementsuser.com/.

The User Magazine is well worth the money alone, not to speak of all the available video tutorials. I have also Photoshop CS3, but I still use PSE. I use the Organiser to keep track of all my photos.
A) i7-3930K 3.2GHz (3.8GHz Turbo), 32GB DDR3-1600, SSD 256GB, 2x1TB+2x2TB Seagate Barracuda (72krpm), Geforce GTX 550 Ti (1GB), Win10 Pro 64-bit
B) Sony Vaio i7-3632QM,12gb DDR3-1333MHz, GeForce® GT 640M LE (2GB), 750GB (7200rpm), Win10 Pro64-bit
User avatar
Gerlinde
Moderator
Moderator
 
Posts: 1018
Joined: Fri Jun 22, 2007 3:45 pm
Location: San Diego,CA

Re: Separating a Subject from the Background in Photoshop

Postby Bill Hunt » Sat Feb 20, 2010 7:13 pm

Gpect,

Thank you for that clarification. The Menu Buttons were the first thing that I thought of, when I read Steve's comment.

I also appreciate the link. I could not get by without my copy of Photoshop User from NAPP.

Appreciated,

Hunt
User avatar
Bill Hunt
Super Contributor
Super Contributor
 
Posts: 926
Joined: Sun Jun 29, 2008 5:06 pm
Location: Phoenix, AZ

Re: Separating a Subject from the Background in Photoshop

Postby Bob » Sat Feb 20, 2010 7:40 pm

Hunt,

I agree, it would probably be worth getting a copy PSE to see for yourself how it differs from PS. There is a lot in common with PS. PSE does share some of the core code with PS and much of the basic operations are done the same. And, there is support for some PS functionality in PSE that is not accessible through the user interface, but which is needed for it to perform the core capabilities. But, the user interfaces of PS and PSE are diverging and the tools in PSE, for the most part, are a subset of those in PS. It's not a one way street though, sometimes tools show up in PSE before they show up in PS. For example, PS had the healing brush and the patch tool, but the spot healing brush was in PSE first.

I'm a PS user from version 6 up. I currently have CS4 and will upgrade to CS5. But, for a long time, I used PS at work and PSE at home. To bridge the gap, I often created actions with PS and installed them in PSE to access the built-in functionality such as layer masks. I've placed my PSE layer mask actions in the gallery for anyone using PSE that wants them. Now, I'm strictly a PS user.

PSE often has alternate tools and means to accomplish a task. There is no Quickmask, but there is the selection brush. There is no extract tool, but there is the magic extraction tool (which is better in my opinion). You can't add a layer mask, but adjustment layers have layer masks and you can create a cliping mask and use the adjustment layer's layer mask as if it were applied to the other layer. Or, you can use an action like mine or the one in Grant's tools to add a layer mask directly. And so forth.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA

Re: Separating a Subject from the Background in Photoshop

Postby Bob » Sun Feb 21, 2010 12:05 am

Just an addendum. I should mention that more recent versions of Photoshop Elements have added a magic selection brush, a quick selection brush and refine edges similar to CS3, adjustment panels similar to CS4, and even content aware scaling (called recompose in PSE 8). They've even included some of the new auto align capabilities. Not too shabby for an inexpensive product.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA


Return to Tips and Tricks 


Similar topics


Who is online

Users browsing this forum: No registered users and 11 guests