advanced photoshop

How to use Content-Aware Fill to improve panoramas in Photoshop CS5

Posted in:
Tips & Tutorials, by The Advanced Photoshop Team

Content-Aware Fill is one of the biggest features of Photoshop CS5. This tutorial shows how we use it to fill gaps created in stitching panoramic images together

With Photoshop CS4, Adobe introduced us to the new algorithm Content-Aware Scale, which enabled users to scale photos without distorting or losing any of the key parts of the composition. This time around, Photoshop has provided us with Content-Aware Fill, which is a technology that intelligently ‘fills’ an area in a photo based on the surrounding background.

Usually, if you want to clone out an offending object from a photograph, you will have to manually use the Clone Stamp tool. This involves telling Photoshop where you want to clone from and, if you’re cloning a large area, it can get time-consuming and extremely frustrating to keep sampling for the most realistic result.

With Content-Aware Fill, however, you can select the object you want to remove, choose the option from the Fill menu and Photoshop will make its best guess as to what would lie behind. It also works as an option on the Spot Healing Brush tool, for those who need an effective solution for retouching photos.

This is not infallible technology and chances are that you will have to do some cloning around the edges to get a perfect result, but it’s a fast and reasonably accurate way to remove unwanted objects from the scene.

In this feature, continuing this issue’s spotlight on Photoshop CS5, we show you how to use it to fill in around a stitched panoramic scene to demonstrate the power of the technology at filling in content that doesn’t exist on a large scale.

Step 1: Merge your images

Step 1Open the images you want to use. Go to

File>Automate>Photomerge, select the files and click OK to merge into a panorama.

Step 2: Make a selection

Step 2Crop the image a bit so that there is less area to fill, then create a new, merged layer at the top of the stack (Cmd/Ctrl+Shift+Opt/Alt+E). Use the Magic Wand tool on this layer to select the first transparent area in the background.

Step 3: Content-Aware Fill

Step 3Once you have made the selection, you need to select the Fill command. Do this with the Edit>Fill menu, or use the shortcut Cmd/Ctrl+Backspace to bring up the Fill dialog. There is now a new option in here under Use, from which you can select Content-Aware. Click OK.

Step 4: And wait…

Step 4Photoshop will now analyse the area and work out how to fill the scene with a likely background. It will consider the colour, contrast and lighting of the surrounding areas and approximate how best to fill the selection. This will take a few moments; the bigger the selection, the longer the wait.

Step 5: Touch it up

Step 5Repeat the last two steps on the other transparent areas. This is a pretty good fill, but there are clearly areas that need to be worked on a bit more. Use the Clone Stamp tool in the usual manner, selecting small sample areas to blend in the filled area seamlessly. While we are still having to clone, a lot of the hard work has been done for us, saving time.

Step 6: And we’re done

Step 6We now have a complete panoramic image, which has expanded into the transparent areas. Try it out on your own images.

  • Martin

    Thanks for sharing!
    Just what I needed. I knew it existed from a commercial about Photoshop, but had no idea how. Now I know, thanks to you and it needed a little touch up, but it is a real timesaver for sure!