ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Photoshop Trick: Content-Aware Fill

Updated on August 23, 2014
Select the canoe...
Select the canoe...
Content-aware fill. Blub blub blub.
Content-aware fill. Blub blub blub.

It's Maaagic!

My Mom, photoshop wizard, told me about this trick over the phone, and I've been having a lot of fun playing with it.

Basically, content-aware fill is an intelligent fill that analyzes what's around the selected area — leaves, sky, gravel, dirt, or any sort of texture or random pattern — and imitates it to fill in the selection.

It's not perfect, but it's amazing what it can do.

Even by itself (right) it's pretty powerful, but with the Clone Stamp and Healing Brush to tidy up, it's astounding.

Let me show you a few examples.

(All photos are my own.)

A Day at the Beach

Erase Your Ex?

This isn't me or my ex, but just to demonstrate:

  1. I used the polygonal lasso to make a rough selection around the figure at left.
  2. I went up to the Edit Menu, chose Fill... and then Content Aware from the first pulldown menu.
  3. I tweaked the lighting using the following menus: Image > Adjustments > Vibrance... and Image > Adjustments > Exposure...

That's it!

In this case, since it was a small area to be filled with a lot of random textures around it, you really can't see the fill area at all.

In the canoe photo above, if you looked closely, you probably noticed something odd happening in the water. Larger areas are more noticeable, because the fill tends to start repeating itself. (But if you'd put Text over that area — a title for a book, for example — no one would ever notice).

Fine Tuning the Fill

Sometimes Content-Aware Fill gets confused about what to use for a background texture.

On my very first attempt, I used a grainy photo of a bluebird sitting in front of a curb with a drain pipe in it. I wanted to remove the drain pipe. But when I tried, since the selected area was right next to the bird, the "fill" decided the bird's feathers were part of the background and continued them into the fill area.

Content-Aware Fill FAIL:

Yes, it's a bad photo to start with. Bear with me.
Yes, it's a bad photo to start with. Bear with me.
3. Copying the bird.
3. Copying the bird.
4. Bird in new layer.
4. Bird in new layer.
6. Selecting problem areas.
6. Selecting problem areas.
7. Content-Aware Fill!
7. Content-Aware Fill!
After retouching with healing brush (continuing the crack by borrowing from the crack to the right of the bird), vibrance/exposure, and sharpen.
After retouching with healing brush (continuing the crack by borrowing from the crack to the right of the bird), vibrance/exposure, and sharpen.

Solution...

  1. Duplicate the background layer (always do this to preserve the original, in case you make a mistake).
  2. Select the bird.
  3. Copy the bird.
  4. Paste the bird into a new layer above all the others.
  5. Return to the Background Copy layer.
  6. Select the problem area you want to fill, including the bird (or whatever was showing up in the fill that you didn't want).
  7. Edit > Fill... > Content-Aware
    ...notice that the bird appears unchanged. That's because you're seeing the bird on the top layer. If you make the top layer invisible for a moment, you'll see that the Background Copy bird has been covered in concrete along with the drainpipe. Does that make sense?

At this point, one can leave it as is or do some touch-up (SAVE first):

Clone Stamp: this lets you copy something from elsewhere on the image and paint an exact copy of it: texturing, cracks, whatever, it'll be a clone.

Healing Brush Tool: this is an intelligent tool that attempts to borrow details from elsewhere in the picture and blend them with the area you're painting. It's hard to explain, but it tends to be more careful about matching lighting/coloring of the target area.

Both the Clone Stamp and Healing Brush Tool require you to alt-click (opt-click on Mac) a "source" area to copy from, before you begin to paint.

Both are useful for smoothing the edges of a filled area or varying a Content-Aware fill that's replicated some detail that's so obvious that it's easy to tell what it was copied from.

Image > Adjustments > Vibrance... and/or Exposure...

These two tweak the lighting; they can really bring out details and make colors pop.

Filter > Sharpen > Unsharp Mask...

Be careful not to overdo it, but this can help bring out details. (You may want to merge the top layer onto the underlayer first — Cntrl/Cmd-E — so that all layers are sharpened together.)

Here's the final result. It's not fantastic, because I started with a fuzzy photo, but you can see how much the composition was improved by getting rid of that drainpipe! Try the same technique with your own photos.

Advanced Example: Removing Utility Poles

Space Shuttle Endeavour being rolled to the Los Angeles Science Center.
Space Shuttle Endeavour being rolled to the Los Angeles Science Center.
1. Select area to be filled.
1. Select area to be filled.
2. Content-Aware Fill.
2. Content-Aware Fill.
3. Problem spots.
3. Problem spots.
4-5. Healing Brush and Clone Stamp.
4-5. Healing Brush and Clone Stamp.
6. Copy pole from elsewhere to make signpost.
6. Copy pole from elsewhere to make signpost.

Another example of Content-Aware Fill

So here's a space shuttle with some utility poles. I can't get rid of all of them, but I feel like removing some of them.

  1. Select problem area. (Tip: Hit the "Q" key for a better view of your selection; use paintbrush and eraser to fine-tune; hit "Q" again to toggle "Quick mask mode" off.)

  2. Edit > Fill > Content-Aware Fill (pulldown menu)

  3. Note problem areas where fill's edges are visible.

  4. Now it's time to get to work with the Clone Stamp and Healing Brush.

    The clone stamp copies other areas exactly and paints them where you indicate; the healing brush borrows from other areas and attempts to blend them with the target area.

    Either way, select the "source" area by Alt-clicking (opt-click on Mac) the area you want to copy, then move the brush over the spot you want to paint and click.

    Notice that the brush tip gives you a preview of what you're about to paint, so you can line up details like the edge of the shuttle's wing or canopy very precisely.

  5. Tools to help you with Clone/Healing: Zoom in! Then remember that the ] and [ keys shrink and expand your brush tip. BE CREATIVE! I grabbed leaves from another tree entirely to tidy up leaves on the tree that needed fixing.

  6. As you see, I covered up one street sign with leaves that was mostly hidden by the telephone pole. But the other one's signpost was also hidden by the telephone pole. What to do? Find another pole in the picture and copy it for the missing signpost!

  7. Repeat for other problem areas (there's a light post on the right side of the picture that I also decided to remove.)

  8. Image > Adjust > Exposure and/or Vibrance to tweak lighting.

Practice makes perfect!

Try experimenting with Content-Aware Fill on several different photos and see what you can do!

Here's what this picture looked like after I finished playing with it.

Before & After Space Shuttle Photo

Here's the original for comparison.
Here's the original for comparison.
Retouched Space Shuttle photo.
Retouched Space Shuttle photo.

Recommended Book

Adobe Photoshop CS6 Classroom in a Book
Adobe Photoshop CS6 Classroom in a Book
My birthday present from my Mom this year. I'm working through it a little bit at a time and learning about all those parts of Photoshop I've never poked my nose into. It's suitable for beginners, but my mother picked it up at an advanced workshop and is still discovering things she didn't know. Included CD has textures and clip art related to lessons.
 

One More Example: Before (Left) & After (Right)

Can you tell what Content-Aware Fill copied to fill in the window frame at lower left?
Can you tell what Content-Aware Fill copied to fill in the window frame at lower left?

© 2014 Ellen

working

This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://corp.maven.io/privacy-policy

Show Details
Necessary
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
Features
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Marketing
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Statistics
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
ClickscoThis is a data management platform studying reader behavior (Privacy Policy)