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:
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:
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:
In the resulting dialog, check the option for “Auto” and click “OK:”
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:
Now, we’re almost there. We should see a single Smart Object now, containing our aligned layer stack:
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:
Wait a moment while Photoshop does the math:
And voila! All the distractions are removed, automatically:
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:
This is amazing! Thanks Michael!
This is amazing! Thanks Michael!
Great stuff! Makes so much sense!
Great stuff! Makes so much sense!
Wow. You Rock, Hoffman.
Wow. You Rock, Hoffman.
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!
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!
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!
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!
Stack mode inactive. Do you have any idea?
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?