Photoshop CS5: The Content-Aware Workflow

By Dan Moughamian Back to


This is the first of three articles on the significant changes in Photoshop CS5: Content-Aware Fill, Painting Techniques, and HDR.

It’s no secret that Adobe Photoshop provides photographers with many tools for accomplishing similar or related retouching tasks. Photoshop CS5 ships with two special Edit commands that work in new ways and achieve high quality results.

The new Content-Aware Fill and Content-Aware Heal provide an intelligent means of removing distracting elements in a scene, by predicting what is “behind” these selected elements and then filling the selection or brush stroke with new textures that blend with their surroundings (Fig. 1).

The Challenge

Figure 2

Compositionally, this photograph has a couple of areas that require attention. The first is the lamppost closest to the camera (along the walkway at right). To my eyes, it pulls attention from the Lighthouse, unlike the other two more distant posts. Stemming from that problem, we’ll also need to remove the reflection of the lamppost. These tasks will be handled with a Content-Aware Fill workflow.

The composition also needs to be tightened, by bringing the points of interest on either side of the lake channel “closer together” without creating artifacts or removing important details. This will be handled with the Content-Aware Scale command, accompanied by an alpha channel we create.

Working with Content-Aware Fill & Heal

Let’s tackle the lamppost first; let’s call this our “target.” I find it is helpful to first zoom in somewhere between 50 and 100% magnification, depending upon how large your image is and how much detail you can see at those settings. The idea is to get a good look at the textural details around the target. This is helpful for determining whether you should attempt to replace the target with a single selection and fill, or if a segmented approach is better (Fig. 2).

Figure 3

Typically, a Content-Aware fill target has multiple texture types nearby, as in scenes like this one where a single lamppost might cover areas of concrete, vegetation, water and sky. Attempting a single selection when multiple textures like these are “behind” your subject will often result in Photoshop guessing incorrectly which replacement textures go where. Here we’re mostly concerned with the vegetation and sky, but given the close proximity of the other lamp heads to the one being targeted, I attempted to take care of it in a single pass.

Step 1

Working on a separate layer, I used the Lasso tool to select the target, taking care to leave a bit of space between the post and the marching ants, while maintaining an accurate shape outline. Remember, you do not want the selection touching your target generally, and you don’t want to leave too much space or else Photoshop may become “confused” as to what you’re trying to replace.

Step 2

Figure 4

Next, choose Edit > Fill…this will invoke the standard Fill Dialog. Under “Use,” select Content-Aware. For this image the options for transparency, blend and opacity were left at their default settings (Fig. 3).

Content-Aware Fill produces the initial result. Often, if you have a very homogenous area of texture around your target, one pass is all it will take to get a perfectly natural looking result! For more challenging situations like this one, it is not uncommon to get a partially flawed result. The lower area of vegetation, some artifacts on the curb and some soft details need further work.

To handle the imperfections in this fill, I selected the flawed areas by shift-dragging around each area

with the Lasso tools, and then performed another Content-Aware Fill. You can see the second attempt produced a pretty convincing result, even at high magnification (Fig. 4).

Figure 5

For our final replacement, both Content-Aware Fill and the Spot Healing Brush can be used in combination to replace the reflection of the lamppost with simple watery tones. I started with the smaller reflections zoomed in to 300% to get an accurate assessment of what needed to be replaced and what should remain, and again used the Lasso tool to carefully select those areas.

Because puddles like these often produce subtle gradients of color, I wanted to replace only the regions of black. After selecting the targets, I ran a Content-Aware Fill; the result is almost flawless. Despite the size of the two smaller reflections, I found the Fill was more effective than the Brush, because the fill did not soften the area and reproduced the color gradients more accurately (Fig. 5).

Figure 6

Finally, the larger reflection was a good candidate for the Spot Healing Brush, because of the homogenous tones and colors that surround it. All that is required is to click the “Content-Aware” option before making a corrective brush stroke (Fig. 6).

Once I had set up my Spot Healing Brush, I made a single “swipe” across the lamppost reflection and it was gone. All that remained was a small touch-up for the tip of the lamp (left of the main reflection). Zoomed out to normal viewing magnifications, there is no hint that the lamppost ever occupied its concrete perch (Fig. 7).

Working with Content-Aware Scale

Once the extraneous or distracting elements of a composition are removed, it was time to tighten up the composition. Content-Aware Scale requires a couple additional steps beyond Content-Aware Fill to get your first correction, but it is, nonetheless, a fairly intuitive process once you have tried it a couple times.

Step 1

The first thing that needs to be done is define the areas that need to be protected from the Content- Aware Scale algorithm. To accomplish this I used the Lasso tool to select the two regions of my image that most defined the composition: the walkway and the lighthouse. Next I clicked the “New Channel from Selection” button in the Channels panel (Fig. 8).

Step 2

Figure 7

I hide the selection and then choose Edit > Content-Aware Scale. This produces a set of transform handles around the edge of the document and provides basic transform options and settings in the Options Bar. I always then choose my Alpha Channel from the “Protect” pop-up menu, to make sure I don’t accidentally scale the wrong parts of my image.

Step 3

I clicked the center drag handle on the right edge of the image and dragged left, being careful to watch for any obvious distortions along the channel walls or trees. Once you get close to the image width required, you can drag the “Amount” slider; the lower the value, the less distortion will be allowed.

For this image I settled on a value around 40%. This ensured the harbor wall and buildings on the left did not take on a “crunched” appearance at normal magnifications. Note that a value of 0% produces the same or very similar result as using the standard Scale command.Also keep in mind that the finished result usually ends up looking smoother than the “live scale” view you see prior to accepting your changes (Fig. 9).

The results for this command usually take a minute or two to process depending on image size and hardware configurations, so be patient. Once finished there will be an area of transparency along the original boundary of the image. That can be cropped away to complete the edits (Fig. 10).

Figure 8
Figure 9
Figure 10

Optional Step

In some situations, you may notice slight “fault lines” outside the boundaries of your Alpha Channel/safe area. Adjust the hardness of your Spot Healing brush accordingly to remove these with the aforementioned Content- Aware Heal mode or some quick cloning if there are obvious patterns that have been broken. Here I fixed a few small errors on the channel wall, removed a power box along the sidewalk and a seam in the concrete to wrap up.

While no tool or command gets perfect results every time, I think you will find that when used in the right scenarios, the Content-Aware Fill and Content-Aware Scale commands are indispensible retouching tools that can save you a lot of time in post-production.

About the Author

Dan Moughamian
Dan Moughamian is a fine art photographer and instructor, having more than 16 years experience with Adobe Photoshop. He is a veteran of Adobe's testing programs and a published author, contributing to the Photoshop CS4 Bible, as well as feature articles at Dan has also authored a series of in-depth Adobe training videos. His upcoming titles from Nonlinear Educating include: Image Retouching & Adjustment with Photoshop CS5 and Raw Foundations with ACR 6.