Did you see...

Automatic Tourist Remover

Here’s a little tip that works with Photoshop Extended, versions CS3 or later, and Smart Objects. We’ve all been in public places trying to take a photograph, and people just keep walking by. Just when you think there will be a break, someone else walks into the frame. But, using Smart Objects and Stack Modes, we can simply take a bunch of shots and let Photoshop remove the people – automatically.

Start with a scene, shooting preferably from a tripod (but this is not mandatory – the images in this example are all hand-held). Take a series of photographs, at least 4-5 works best, but more is better (up to the point where your system starts to strain under the load). I’ve found 5-10 exposures to be optimum. Take them so that, no matter where people are in any one frame, you have clear background in that area in at least two other frames. In this example, I will start with these 9 images:

StackMedian01

Notice how every image has people walking through the scene, but for every spot with a person blocking it in one frame, there are at least two others where that spot is clear.

Now, we want to take these images and load them into Photoshop as a layer stack. I’m starting from Lightroom. From Lightroom, select the 9 images, and choose Photo > Edit In > Open as Layers in Photoshop.

Note: If you’re working in Bridge, you can highlight the group of files and use Tools > Photoshop > Load Files Into Photoshop Layers…

In either case, we get the files loaded into Photoshop, and our workspace looks like so:

StackMedian02

The next thing we want to do, is align all the layers. This is especially important if (like me in this case) you were hand-holding the shots. In Photoshop, shift click to select all the layers in the Layers panel, and choose Edit > Auto-Align Layers:

StackMedian03

In the resulting dialog, check the option for “Auto” and click “OK:”

StackMedian04

This may take a little while, depending on the size and quantity of your images, and the horsepower of your system. Once complete, I find it useful to hide all the layers and turn them back on one at a time just to make sure one isn’t out of alignment. If it is (and this sometimes happens), you can tweak it, delete it, or try again.

Once the alignment is complete, make sure all the layers are still selected, and from the Layers panel flyout menu, choose Convert to Smart Object:

StackMedian05

Now, we’re almost there. We should see a single Smart Object now, containing our aligned layer stack:

StackMedian06

Now, for the simple magic, we use the Smart Object Stack Mode of “Median,” which will mathematically remove all the areas that are different in any single image. Choose Layer > Smart Objects > Stack Mode > Median:

StackMedian07

Wait a moment while Photoshop does the math:

StackMedian08

And voila! All the distractions are removed, automatically:

StackMedian09

At this point, the image is ready for cropping, and for post-work. Nicely done, Photoshop!This sure beats cloning, patching and healing, and is even better than Content Aware Fill – provided you thought ahead and made a series of exposures, instead of just one. Think of this for architectural shots on busy streets, for bridges and roads where you don’t want to show any automobiles, and of course, for the namesake application: automatic tourist removal!

Here is the final image, nicely cleaned up and with all the passers-by silently removed:

StackMedian10

About Michael Hoffman (224 Articles)
Mike has been a photographer, artist, educator, and technophile for most of his life. Early in his career, he created technical illustrations and photographs for electronic equipment manufacturers, and taught classes in computer aided drafting and 3D modeling software. When digital cameras became widely available in the late 1990s, the move was a natural one, and has led to a happy combination of technology, software, photography and art. Mike is an Adobe Certified Expert in Photoshop and Acrobat, and is well versed in Lightroom and Photoshop Elements, as well as Illustrator and InDesign. He has also contributed his time and efforts to the excellent work being done by Operation Photo Rescue, in restoring photographs damaged by natural disasters. As an active member of the National Association of Photoshop Professionals, he continues his quest for excellence in art, excellence in design, and excellence in education.

12 Comments on Automatic Tourist Remover

  1. Christine Pentecost // 27/07/2010 at 3:32 pm //

    This is amazing! Thanks Michael!

  2. Christine Pentecost // 27/07/2010 at 3:32 pm //

    This is amazing! Thanks Michael!

  3. Nancy Burban // 27/07/2010 at 11:50 pm //

    Great stuff! Makes so much sense!

  4. Nancy Burban // 27/07/2010 at 11:50 pm //

    Great stuff! Makes so much sense!

  5. Michael // 28/07/2010 at 4:03 am //

    Wow. You Rock, Hoffman.

  6. Michael // 28/07/2010 at 4:03 am //

    Wow. You Rock, Hoffman.

  7. OMG! I’ve been working with Photoshop since day one. I LOVE learning new things in PS, and it a rare day when I do. I’ve never really had a lot of need for such an edit, but I see so many applications that I can use. Dude, THX!

  8. OMG! I’ve been working with Photoshop since day one. I LOVE learning new things in PS, and it a rare day when I do. I’ve never really had a lot of need for such an edit, but I see so many applications that I can use. Dude, THX!

  9. Laryl // 29/07/2010 at 7:33 am //

    awesome! hope this stays on the site for the day I need it and won’t remember 🙂 very cool, took me into areas I’ve never been before. All those choices under Stack Mode are totally foreign to me. thanks!

  10. Laryl // 29/07/2010 at 7:33 am //

    awesome! hope this stays on the site for the day I need it and won’t remember 🙂 very cool, took me into areas I’ve never been before. All those choices under Stack Mode are totally foreign to me. thanks!

  11. tbctr // 19/06/2013 at 3:30 pm //

    Stack mode inactive. Do you have any idea?

  12. I noticed that after I stack–>mean to smooth out waterfalls, the image overall gets blurry and out of focus. Why? And what can I do about it?

1 Trackbacks & Pingbacks

  1. Automatic Tourist Remover | TipSquirrel | Local Blogger Writes the World

Leave a comment

Your email address will not be published.


*