New? Join Today! » Create an Account | Sign In

The Digital Eye: The Cutting Edge

 

For years the art of collage was literally a cut-and-paste affair. A skilled artist with a super-sharp X-ACTO knife could carefully cut out a fragment of a printed paper photo, bring it to the target image, and anchor it in place with rubber cement to create a totally new reality. Unfortunately, in the early days of collage, the composites were frequently detectable by the white edge of the cut paper. 
 
Sometimes the compositor muted the effect by carefully inking the thin edge of the paper. When pasting to dark areas this technique worked pretty well but on lighter areas the shadow cast by the paper’s edge may have been visible when photographed by a process camera. If you look at old magazines from the 1930s through the ’70s, when ads were commonly created with the “paste-up” technique, tiny cut marks can sometimes be seen.
 
Digital software has resolved this and many other annoying idiosyncrasies of the graphics workflow, and transformed compositing into a much more efficient and accurate process. From its inception, several methods in Photoshop have aided in precisely isolating areas with diffuse, complex, or indefinable edges, a task undreamed of in the cut-and-paste era. Even so, from its first release to the current version of the software, techniques have evolved to where now it’s easier than ever to seamlessly assemble images from multiple sources no matter how complex, delicate or fuzzy their edges happen to be.
 
SELECTION MACHINE
If you use Photoshop you are probably aware of how much of the program is devoted to tools and commands that isolate large or small regions of an image for editing. The ability to make accurate selections is crucial to the credibility of any image altering technique. A bad selection can be a dead giveaway that something about the image just ain’t on the level. 
 
Figure 1: On the new alpha channel, edge areas between foreground and background are carefully painted black or white with a soft brush to mask or expose the edge. 
 
One technique for selecting ambiguous edge detail involves duplicating the color channel with the most contrast to create an identical alpha channel. A levels adjustment is applied to increase the contrast of the new alpha channels. Edge areas between foreground and background are then carefully painted black or white with a soft brush (see Figure 1). The altered alpha channel is then loaded as a selection and the composite is made by dragging the content to the destination image (see Figure 2). Unwanted colors can be desaturated using the sponge tool. This technique works for images with ultra-fine edge detail but can be quite labor intensive and have you tearing out handfuls of your own hair while trying to paint individual hairs on the models head. 
 
Figure 2: The altered alpha channel is loaded as a selection and the composite is made by dragging the content to the destination image. Unwanted colors can be desaturated with sponge tool. 
 
But hold on! There are newer and faster methods that require much less effort to produce phenomenal results.
 
REFINE EDGE
The last three versions of Photoshop have included the Refine Edge feature that presents a systematic method for altering a selection outline to include (or exclude) ambiguous details with precision. You start the process by making a selection outline with any of the selection tools. When you open the Refine Edge dialog box (click the Refine Edge button in the Options bar) you see a preview of your selection masked by a white background. The View Mode menu displays different masking options including Marching Ants, which displays the selection outline; Overlay, which displays a red overlay; On White, the default (Figure 3); On Black; On Layers, which displays a transparent background; and Reveal Layer, which displays the layer’s entire content. These views are useful for best determining how the selection will appear against various backgrounds. 
 
Figure 3: This example shows an image that has been selected before refining with the Refine Edge dialog box showing the default white mask.
 
The Adjust Edge field has four sliders that alter the character of the selection edge. Smooth rounds sharp corners of the selection edge, Feather gradually softens the edge of the selection from opaque in its interior to transparent at its outer extremity within a specified distance in pixels. Contrast displays more edge detail without reversing the effect of feathering if the two are used together, Shift Edge contracts the size of the selection edge if the slider is dragged to the left toward minus values and expands the edge if the slider is dragged to the right toward positive values. As you drag the sliders, the image window displays the effect in real time against the mask that you chose.
 
Figure 4: By painting over the edge with the Refine Radius and Erase Refinements tools, you can precisely adjust the border area where the refinement occurs to select minute details like individual hairs. In this instance the mask has been converted to black for better visibility.
 
 
WAIT! THERE’S MORE!
Much of the real power of the Refine Edge command lies in the Edge Detection feature, and here is where you can customize your selection and pick and choose miniscule edge details like hair or fur. Smart Radius automatically adjusts the radius for the hard and soft edges found in the border regions. Deselect this option if the border is uniformly hard- or soft-edged, or if you want to control the edge with the Refinement Radius tool more precisely. The Radius slider determines the size of the selection border in which edge refinement occurs. Use a small radius for sharp edges, and a large one for softer edges.
 
By painting over the edge with the Refine Radius and Erase Refinements tools, you can precisely adjust the border area where the refinement occurs. By changing the brush size (press the left bracket enlarge and the right to reduce) you can include minute details such as hair or fur in the selection (see Figure 4). 
 
Figure 5: If the content is saved to a separate layer with a layer mask, it can be further altered with the Masks Panel, which looks a lot like the Refine Edge feature.
 
The Decontaminate Color option replaces color edge pixels with the color of fully selected adjacent pixels. The strength of the color replacement is proportionate to the softness of selected edges; however the strength can be further controlled by the Amount slider that controls the level of decontamination and fringe replacement. Because this option changes the color of pixels, it should be output to a new layer or document. 
 
The Output To option determines how the refined selection is saved. It can be saved as a selection outline (marching ants) a layer mask on the current layer, a new layer with a layer mask, as a totally new document, and as a new document with a layer mask.
 
Outputting to one of the layer mask options is advantageous because even after the selection is transformed to a mask, it can be further be altered with the Masks Panel, which looks a lot like the Refine Edge feature (see Figure 5). 
 
Figure 6: Light colored edge pixels can be removed by defringing.
 
ON THE FRINGE
An important point to take into consideration when compositing images is the color of the surrounding pixels outside the selection edge. If a selection is made to content on a white background, for example (see Figure 6), even if the edge has been refined, the content may contain unwanted semi-transparent light colored edge pixels that result from the inclusion of the anti-alias of the selection border when the content was copied or cut to a new layer. These pixels compromise the composited image and should be corrected by defringing. The content has to reside on a separate layer surrounded by transparency. Choose Layer > Matting > Defringe to display the dialog box. Enter a value in pixels to eliminate or reduce the opacity of the edge pixels so they convert to a color closer to the pixels on the destination image. 
 
By using these techniques you will be assured that your composite images are seamless and undetectable by the observer and that the credibility of your images are uncompromised. 
   
   
   

Leave a Comment

Premium Subscription

Please sign in to leave a comment

Click here to Sign in. Don't have an account? Join Today (It's Free!)