Content Aware Fill (CAF from now on so I don’t have to keep typing it) and the content-aware healing brush have dramatically streamlined the workflow, especially when trying to remove things like power lines or other objects. You can use the venerable clone stamp tool, but it’s more work, leaves behind lots of artifacts you have to clean up, and if you’re not careful, creates repeating patterns that are annoying and distracting in the image.
But sometimes, CAF produces unpredictable results. That can be good or bad: here’s a little ad image I created without intending to, when all I was trying to do was to isolate a couple of First Aid kits on a background. CAF picked up some unexpected content when I tried to use it. A very neat unanticipated effect!
Generally, though, you’re trying to remove something from an image and replace it with what looks like the original background. If you’ve never used the Content Aware fill and healing brush functions, here’s a simple example. If you have, you can skip a few paragraphs.
Suppose I want to remove the sign from this picture.
Draw a loose selection around the sign. You can use any selection tool – I usually just use the lasso but in this case I used the quick selection tool then expanded the selection by 50px or so. If the selection is tight then you’re going to see seams and edges around the area after you fill it. Be generous – give it space to breathe! Then hit Shift-F5 to invoke the Fill dialog and select content-aware from the drop down menu. It’s sticky: it’ll still be selected next time you try to use it.
In this screen capture, I painted the edges of the selection so you could see it.
The sign is magically gone. But the post is still there (I could have removed that in the same step but then I wouldn’t get to illustrate the CAHB -- Content-Aware Healing Brush). The background fill isn’t perfect but this is just a quick example. Paint over the post with the CAHB using a brush that’s about 50% bigger than the post (again, it needs room to breathe) and like magic, the post is gone, replaced with what Photoshop figures is what you wanted to be there.
Here’s the finished product.
What the CAF tool does is to look around the layer and using some very sophisticated algorithms, calculate what should replace the area you’re filling. I’ve just dropped a major hint about what the trick is. So if you’ve already figured out what I’m going to say, great! If not, follow me here.
OK, here’s another image I want to remove something from. The table at lower right shouldn’t be there.
So I make a loose selection around the table, hit shift-F5 <enter> and it’s gone! It even added in the wall duct, almost right down to the corner. But not totally seamlessly – it left some traces behind so I need to go in and fix it a bit.
Easy enough, right? Just make another selection around the area you want to clean up and do it again. Uh oh. Look what I got!
It picked up the leg from elsewhere in the image. Not what I wanted! I want it to pick up plain blank wall.
So let’s limit what CAF has available to it to choose from when doing the fill. Select only acceptable areas and copy them to a new layer (make the selections, then hit ctrl-J or cmd-J on a mac). In this case, you’ll have a layer that has only blank wall. Be sure to include the area you want to replace.
Working on that new layer, make a loose selection around the area you want to fix up and do your shift-F5 thing again. Sometimes it takes a few passes to completely clean up the image, but it’s relatively painless and quick. The last step is to merge the new layer with the original one. All done!
This is a lot less work and leaves a much cleaner blend than any of the other methods I’ve tried. OK well maybe not in this example, because I was trying to use one that was really obvious so you could see what’s going on. And I did it in a more complex than necessary sequence so I could show you how to do it and get the screen captures as I went along.
You could make your workflow even faster by creating a new layer first, either by selecting only the areas you want CAF to work from and hitting ctrl-J (Cmd-J) or by duplicating the whole layer then erasing all the stuff you didn’t want. Remember to leave enough behind for CAF to work from, outside the area you’re filling.