Learn how to isolate an image in Photoshop and then use it however you want.
Anyone who has ever taken a buddy’s Facebook profile picture and tried to Photoshop their face or body into a different photo–anything from blocking a Kobe dunk to getting kicked by Leonidas into the pit of death–will tell you that making a basic cutout of a person and slapping it onto a backdrop is not all that difficult.
The problem with those kinds of pictures is that they derive part of their hilarity from how badly they’re made, with a terrible lighting mismatch and jagged selection lines that crop off parts of hair and fingers.
In most cases, if something more professional is on your To-Do list, you have to turn to a technique known as Chroma Key. A favorite for Hollywood CGI specialists and news channel meteorologists alike, chroma keying involves putting the subject in front of a minimally reflective backdrop of a single color.
When the photo or video goes through post-production editing, the backdrop is made transparent, allowing for extra material–from a computer rendered post-apocalyptic city street to the progress of yet another cluster of disappointingly cold summer thunderstorms–to be inserted into the background.
In our case, it will help us create a versatile banner image for a real estate developer that allows different backgrounds to be inserted behind them. This becomes especially helpful since this developer does not have to pose in front of what is meant to be the background, the location of which could be on the opposite side of the country.
- Taking Photos for Background and Foreground (Green Screen)
- Polygonal Lasso Tool
- Magnetic Lasso Tool
- Quick Selection Tool
- Color Range Tool
- Green Screen Issues after Image Separation
- Fix Green Screen Issues
- Insert the Background
Consider Lighting With Destination In Mind…
The first step to editing a photograph is taking the photograph in the first place, and one of the first elements to go up for a photo shoot is the lighting. If you’re going after a professional and nearly seamless match for foreground and background follow this advice.
The lighting for the chroma key source–in our case a photo of the real estate agent–has to match the atmosphere of the background image we eventually intend to use.
Since real estate agents revolve their professional duties around housing, the backdrop for our scenario will be an exterior shot of a neat suburban housing development, taken at approximately 2 pm. Consequently, the most convenient way to match the lighting in the two shots is to set up the backdrop outside and take the shot at a similar time of day during similar weather.
Backdrop – Blue or Green?
Over the years, the film, photo, and news industries have used more backdrop shades than we can count — everything from the standard green and blue to pink and magenta. What is the logic behind the color choices, then? Better yet, what makes one choice better than the other? The theory behind the process is fairly simple – in order to make chroma keying easier, and in some cases even automatic, the backdrop has to offer a strong contrast to the object in the foreground.
Since the skin of most humans has a color found in the warm region of the color spectrum–peach, beige, brown, and other similar tones–the logical background to use is of a respective complementary color – blue or green.
Although in the pre-digital days blue was the preferred color due to the crispness the blue channel offered on film, the digital editing software developed over the course of the past decade has pushed preference towards the color green. So much so, in fact, that the term “green-screen” has replaced “chroma key” in much the same way that “Chapstick” and “Kleenex” have replaced “lip balm” and “tissues”.
Why? Green offers several advantages over blue. Most importantly, it has a higher luminescence, allowing for less artificial lighting to be used while achieving the same brightness. The presence of blue on clothing, such as jeans, also skews the odds in green’s favor. Unless you’re filming a squad of Marines that are a helicopter ride away from a jungle mission, there will typically be more blue garments on foreground subjects than green ones.
In the grand scheme of things, the verdict goes to green as the color of choice, but with each shoot the demands on the background are different. If the star of your photoshoot is handling plants or vegetation, blue will be a better choice. If the foreground consists of an aqua-colored puppet, a red background will be of much more use than any other color. The key, no pun intended, is to create as much contrast as possible to lighten up the workload on the selection of the foreground.
In Photoshop, the Ends (Sort Of) Justify the Means
Once you are content with one of the photographs you’ve taken, you can move into the world of Photoshop to separate the subject from the backdrop. Photoshop, like the rest of the Adobe suite, is very effective at allowing the user to achieve the same result through several different approaches.
In our case, there are four ways to separate the subject from the backdrop, and which ones are used is mainly dictated by the tonal ranges within the green screen and the hardness of the foreground subject’s outline. It is important to keep in mind that often times multiple techniques have to be used on a single image to counteract each others’ weaknesses and to capitalize on their respective strengths.
Manual Labor with the Polygonal Lasso Tool
The simplest, easiest in concept, and incidentally most labor-intensive way to cut out anything in Photoshop is to do so manually with the help of the Lasso and Polygonal Lasso tools. This tool can be selected at the top of the toolbar between the Marquee and the Magic Wand.
NOTE: Lasso Keyboard Short Cut = L
The Polygonal Lasso is preferred since the control points for the selection are placed only with clicks, allowing your hand the freedom of not constantly having to be perfectly on the path you are selecting.
The issue with this method is that in order to make the selection appear fluid and less polygon-based, clicks have to be made every 10 or 20 pixels, which quickly turns the ordeal into a form of cruel and unusual punishment. More often than not, this technique is used to finalize small portions of a selection where the backdrop and foreground tones are not different enough to suffice any of the subsequent methods.
Autopilot with the Magnetic Lasso Tool
A step up from the manual selection is utilizing the Magnetic Lasso. This tool is an evolution upon the Lasso and uses an algorithm to find points of high contrast–or boundaries–within the near vicinity of the cursor. This is where having a consistent backdrop comes into effect, as the Magnetic Lasso can be sensitive towards changes in the backdrop tone and read them as part of the foreground.
NOTE: Right Click on the Lasso Tool to Select the Magnetic Lasso
The sensitivity of the tool towards these changes can be adjusted at the top of the workspace, but no matter how sensitive, the tool will still only draw a single selection line. This means that it reacts badly to soft edges such as hair, creating chunky outlines that don’t take porosity into account, and should consequently be kept confined to its natural habitat–hard edges such as clothing and skin.
Width – How far the points will be placed from the cursor. The smaller this number the closer your cursor will have to be to the desired placement.
Contrast – The lower this value is, the less contrast is required to determine the actual position of the edge (where the line will be placed).
Frequency – When you reduce the frequency, you’ll get a rougher selection. The reason being, fewer fastening points are placed on the path.
Change Your Selection
After you make your selection you can further alter it with these buttons (visible in top left when lasso tool is selected). Numbered left to right.
- New Selection
- Add to Selection
- Remove from Selection
- Intersect with Selection
Quick Selection Tool and Algorithms
So what would one use to negotiate these softer edges? Enter the Quick Selection tool. From first glance, it looks and sounds like a marquee that spits out basic shapes and doesn’t respond to complex geometry, but this notion quickly fades the moment the “Auto Enhance” box is checked at the top. This turns the humble little Quick Selection tool into a brush that samples large portions of the image at any given time and detects any boundaries without you even needing to point them out.
NOTE: Quick Selection Tools Shortcut = W (If you get the Magic Wand, right-click the Wand icon to select the Quick Selection Tool)
Furthermore, it analyzes how hard or soft they are and applies a similar feathering to that part of the selection to replicate the original condition. Simply click and gently drag within the green screen (backdrop) part of your image and you will soon find most of it nearly perfectly outlined in the selection.
But wait; there’s more! The size of the Quick Selection brush as well as the speed with which you swipe the area you wish to select dictates how granular the selection is, with a smaller brush and slower strokes producing a much more detailed selection that is capable of bending around and adequately feathering locks of hair or individual fingers.
And in case the selection of the background begins to dip into the subject, you can always hold Alt and slowly brush inside that selection to un-select it with the same algorithm.
Going Pro with the Color Range Tool
This is the big one–the heavy hitter. This method is the one most preferred by the photo and film industry and involves very little manual selection. From the “Select” drop down menu at the very top of your screen, you can click the “Color Range” option. That runs a fairly simple script in which you identify a hexadecimal color value–this can be selected anywhere on the image with the Eyedropper tool the Color Range window provides–and Photoshop automatically scans for that value in every pixel of the image.
This, however, gets more effective and more complex with the “Fuzziness” slider, which increases the range around the specified color that will also be selected. The best strategy is to sample, with the Eyedropper, a shade of green from the green screen that is in between the lightest and darkest greens present, and then to increase the Fuzziness until those same lightest and darkest colors are included in the selection, but without having too much of the subject highlighted as well.
If the range of greens is too varied, the alternative is to first select all of the mid-tones and delete those, then target the highs and lows with two more separate Color Range selections. Due to its direct dependence on the tonal ranges within the backdrop, this technique works best only if the green screen being used is relatively smooth, matte colored, and lacks serious highlights and shadows.
Revenge of the Green Screen
Congratulations! You’ve used one–or several–of the separation techniques, and now all that remains of the original image is the foreground subject that you wish to use. Except…Nine times out of ten, even with a perfectly selected cut, the green screen will not be too eager to be left behind.
It’s haunting comes in the form that resembles a green inner glow all around your subject’s outline. This is caused by the physics of light and reflection.
Have you ever looked into the distance along a hot asphalt road in the summer? You may have noticed that the far away surface turns into a mirror, literally reflecting what is above it. The reason for this is that at that distance, your vision is nearly parallel to the surface, at or below what the scientific community calls the “critical angle” of reflection.
The problem with human subjects is that the clothes wrap around us in a curve, meaning that along what we see as the outer boundary of our green screened subject, the surface is parallel to the camera’s view, and consequently reflects the backdrop.
Hue and Saturation — A New Adjustment
Assuming that the subject is not clothed in glass, mirrors, or disco balls, this issue can be fixed. Above the Layers window, you will find an Adjustments tab. Or select Window in the menu and select Adjustments if you don’t see it.
This creates a new layer above the original with several adjustment sliders. At the bottom left (image below) of that pane will be a downward facing arrow icon (or a Venn diagram button labeled “click to clip to layer” in older versions).
2. It is important to press this so that the adjustments made only apply to the layer underneath, and not to the entire composition which will include the background image later on. After you click the Clip to Layer button the Hue and Saturation layer will display the down facing arrow.
At this point, you can start experimenting with the sliders, mainly focusing on the Hue and Saturation adjustments. If the clothes on the subject are mainly greyscale, the easiest method to negate the green reflection is to simply knock the saturation down until the green is no longer noticeable.
If the clothes are colored, shifting the Hue position will allow you to change the green glow to the tone of the clothes. The issue is that this adjustment affects the entire foreground, while we only want it to impact the thin region of green. This calls for brushwork on the adjustment layer’s mask.
The Hue and Saturation Layer has a white box to the left of the layer name. This box displays which parts of the composition the adjustment affects, with white signifying 100% effect and black meaning 0%.
3. If you click in this box, you will notice that the foreground and background color boxes found at the end of the basic tools window will also handily change to black and white.
NOTE: Keyboard Shortcut to Switch Foreground and Background Color = Shift + Xb
4. Now it is just a matter of coloring the mask black wherever we do not wish the Hue and Saturation filter to take effect and vice versa. Since the majority of our composition should not be affected, it is recommended to select the Paint Bucket tool and make the entire mask black at the start.
NOTE: Select the Paint Bucket tool by pressing G or use the icon
NOTE: Or if the icon isn’t visible, right-click the gradient tool and select the bucket.
NOTE: Click on the Foreground color to change it
5. Then, using a brush with foreground color set to White, Hardness set to 0%, and Flow between the 20% and 50%, start to brush away at the edges of the subject where the green occurs.
Setting the Hardness and Flow this low allows for the brush marks to be feathered – to fade softly around the area you painted instead of having a rigid boundary – just like the green reflection on the clothes.
While you don’t have to worry about putting too much white outside of the subject–the transparent area will not be affected by the adjustment–it is essential not to color in too much or too little of the green to keep the adjustment layer affecting only the parts it needs to affect. This takes a little practice, but keep in mind that any excess white can always be painted over with black again, and that the sliders on the adjustment can be tweaked at any time during this process.
Reduce Green with the Curves Adjustment Layer
In the off-chance that even after this procedure the edges still look too green, you can repeat the above steps with the addition of the “Curves” adjustment layer.
Once it is added, locked to the foreground layer, and masked off, click its Layer Thumbnail to the left of the “Curves” text to bring up the Layer Properties window, and then switch the drop-down tab below the “Custom” bar that says “RGB” to “Green”. From here, dragging the curve down will incrementally reduce the amount of green across all of the shades of that tone within the mask. Remember, you don’t need to re-mask the new layer from scratch. You can copy the mask you made on a previous layer to a new one by Control-clicking (Windows) or Command-clicking (Mac) on the thumbnail of that mask in the Layers window, left-clicking on the new layer to be masked, and clicking on the “Add Layer Mask” button (it looks like a circle inside a rectangle) at the bottom of the window.
Bring In the Background
Great news–the hard part is over! Now you’re only a few stylistic refinements away from the finished product. The first thing to look for, after inserting your preferred background image is its positioning on the composition. With one-point perspective shots, it is important to implement the horizon and vanishing point from the foreground into the background.
Here is an easy way to visualize this: if you are taking a picture of a flat field with many people of the same height strolling about, and the camera is held at eye level, all of the background subjects’ eyes will be anchored to the same horizontal line. In other words, while the people farther away from the camera will be smaller, it will be the part of them that is at the level of the camera that will be at the same height from the bottom of the frame.
In our case, since the camera is at around chest level and pointed slightly up, we will want to move the background image up or down so that parts that normally occur at chest level are along that same horizontal. Simply imagine a person in the scene and use those imaginary dimensions to point out markers to line up, such as window sills and railings.
To Conform or Not To Conform?
Having done this, the image should look much more natural and less tense. Making it look even more realistic, however, involves color correction. This is where taking the original subject photo in the same lighting conditions as those present in the background really becomes a life-saver. If that technique hadn’t been implemented, we would’ve had to do extensive color grading and artificial light and shadow manipulation within Photoshop to really get the foreground and background to correspond. Fortunately, that can be avoided almost entirely, and we can focus on much more playful things.
Odds are, that although the lighting conditions correspond between the foreground and background, there will still be differences in Exposure, Brightness, Contrast, and Color Balance that result from different camera settings for the two shots. At this point a decision has to be made–do you want to conform the foreground color palette to the background to achieve higher realism, or do you intentionally wish to create a subtle distinction in order to highlight the foreground subject?
Regardless of your choice, you can implement adjustment layers for all of the above parameters to the foreground or the background and tweak them as needed. The choices here are based more on personal preference, however for the sake of an easy example, we will go for greater realism. If the foreground is too blue, we can apply a Color Balance adjustment layer and skew the values towards yellow. If the background lacks the light-to-dark contrast of the foreground, we can apply a Brightness/Contrast adjustment layer to tweak that. Alternatively, we can use a Curves adjustment and raise the right (lighter shades) side of the line while lowering the left (darker shades) to produce an identical effect.
The final effect (optional) you can choose to apply is a lens blur to the background. In most cases, this allows you to highlight the foreground subject and create greater realism at the same time.
The more advanced cameras and lenses offer an extensive depth of field–something the image lacks if both the foreground and background are in focus. From a stylistic perspective, however, the blur should respond to your goals for the image.
For instance, if you wish to extract only the main concept–buildings…many, many buildings in our case–from the background, a blur effect would suit you well and help make the background less dominant and distracting. On the other hand, if you wish to show off the details of a building you designed, keeping the blur to a minimum will be in your best interests.
The effect itself can be found by clicking on the “Filter” button at the very top of your screen, hovering over the “Blur” option, and selecting “Lens Blur”. This takes you to a different window where a sample of your image is displayed on the left, while the blur options occur on the right.
For simplicity, the main slider to focus on is the one labeled “Blur”, and in most cases and at most resolutions, any blur value from 15 to 35 should do the trick. As with the color correction, there are very few wrong answers here, and the amount of blur is mainly governed by your own personal preference.
Overall, when isolating parts of an image, there are many techniques. I hope the methods covered here have helped you develop your bag of photoshop tricks. If you have a technique to add or if you have a question, please use the comment section below.