A question came up on the Alaska Eagle trip about removing an object from its background. I was asked what was the “best” way which is a subjective question of course. What I shared was the most “powerful” way… Calculations. The Calculations command can be used to create a new selection based on the details in an images channels. This technique doesn’t work on all images, but when it does, its a big success.
- Open an image that has a complex subject over a background.
- Select the Channels panel (Windows > Channels). You need to determine which channel has the greatest differences between subject and background. Because you want mask the background, look for the contrast between the foreground and background. The blue channel should stand out.
- Choose Image > Calculations and make sure the Preview box is checked. It’s now time to add one more channel to the blue channel to create a new channel based on the color. This new channel will be the alpha channel and can be used to store transparency data.
- In the Source 1 area, set the Channel to Blue. In the Source 2 area, you’ll need to experiment to find the right combination of channels and blending modes. In the case of this image, the red channel is a good place to start, because it looks the most different from the blue channel.
- Choose Red from the Source 2 pop-up and click the Invert check box to reverse the details. This will help mask out the bird.
- Combine the Blue and Red channels by using Blending. Use the Blending menu, to experiment with different blending modes. Blending are used to control how two different images or channels blend together based on their color and luminance values. Different source images need different modes, so you’ll need to click through many of the modes on the list. You may also want to try deselecting the Invert check box when working with other images. In this case, the Linear Burn mode works well to create a clean matte of the bird.
- Click OK to create a new channel in the Channels panel. The channel, should be named Alpha 1 automatically and becomes the active selection in the Channels panel (with the RGB channels turned off, for now).
- It’s now time to touch up this channel into a clean black and white mask. This will be done with a Levels adjustment at first. Choose Image > Adjust > Levels or press Command+L (Ctrl+L). Move the White Input Levels slider slider to the left to lighten the gray areas to white. Move the Black and Gray Input Levels sliders to refine the matte and improve contrast between foreground and background.
- The new matte is very close and just needs a little touch up. Choose the Brush tool and set the foreground color to white. Paint over any areas that need to be removed from the matte. You may find it easier to zoom in and paint with a smaller brush. You can also run a one pixel Gaussian Blur on the channel with the Filter command.
- Once the alpha channel has all holes filled in, Command-click (Ctrl-click) on the alpha channel thumbnail to load the selection. For this image, you may need to choose Select > Inverse to reverse the selection so the bird is active.
- Click the visibility icon next to the RGB composite channel to enable it. Click on the RGB composite channel so it is the active channel as well. Look closely at the selection; it should be pretty accurate.
- Choose Select > Refine Edge to improve the selection.
- Use the Refine Edge command to improve the selection. The Smart Radius option with a low value should do the trick. You can use the other sliders to taste.
- Click the Output pop-up menu in the Refine Edge dialog and choose New Layer with Layer Mask.
- Click the check box next to Decontaminate Colors and click OK.
- In the Channels panel, disable the visibility of the Alpha 1 Channel to see the final results.
Rich has published over 100 courses on Lynda.com. Rich has authored several books including From Still to Motion, Understanding Photoshop, Professional Web Video, and Creating DSLR Video.
Latest posts by Richard Harrington (see all)
- How do I remove noise from an image in Lightroom? - September 25, 2017
- DSLR Video Weekly: The Impact of Light and Motion on Focus - September 23, 2017
- Strategies to Avoid Oversharing on Social Media - September 23, 2017