How Can I Remove People Who Are Walking Through a Scene in a Photograph?

I know there's a few ways to do this, but I'm not sure about the exact instructions for any of them. Here's my problem; I went on vacation to Italy a few weeks ago and I took many photos of the beautiful cities there. I didn't use a tripod, but I kept my camera very steady while photographing. There were many people walking through the scenes I liked, but not so many that the area was overly crowded or anything. Basically, I took multiple shots of each scene (probably around five each) because I knew that if I did that, the people would be in different spots in each shot. I could then take the photos back to Photoshop and somehow remove the people. I saw a video on Youtube a while back where the guy in the video did exactly what I'm looking to do here. He used masks on his layers. Would anyone happen to have the exact instructions for getting rid of people or moving objects from a group of almost identical photos where the people are in different places each time?
 

JGaulard

Member
Staff member
Pro Member
You can totally do this, but which method you choose totally depends on the circumstances in which you took your photos. Let's say you set up a tripod and captured two photographs of a scene. In every which way, the photos are identical, except that in one photo, a person is standing in one spot and in another, a person is standing in another spot. It would be very simple to import both of these images into Adobe Photoshop as layers and then use masks to simply mask the first person out of the first photo and then the second one out of the second photo. Since everything in the images is perfectly lined up, you'd never know those people were there because their now empty places would be filled in by the alternate image.

Things get much more complicated when there are people milling about in an area and if the images aren't completely 100% lined up with one another. It's sometimes impractical to simply mask out each and every person, so bigger tools are necessary. These tools include the Auto-Align Layers feature in Photoshop, Smart Objects, Stack Modes, Masks and using the Spot Healing Brush Tool. I'm not sure if this would be considered an advanced topic, but I can tell you that once you get through it once, it's as easy as pie. That's for sure. I'll cover the process for you below and if you want, you can check out my recent post on removing moving objects from a photo using Adobe Photoshop.

By the way, I'm assuming you're referring to a scene like this one below.

town-square-fountain-europe.jpg

This is exactly the type of place where people would be passing by, walking right through your shot. There's nothing you could do about that other than to take multiple photos in the hopes that the people are in different positions in each one.

Okay, I'll tailor my example to your situation. You first said that you took approximately five photos per scene. That's great. That should be enough, as long as there are some spots were people aren't. You may need to use some spot healing towards the end if there are people left over, but we can deal with that later on. To start out, we'll need to get the images into Photoshop as layers. To do this, open Adobe Bridge and locate your images. Select all five of them for your first scene and then go to the Tools > Photoshop > Load Files into Photoshop as Layers menu item and click. What this does is it takes all of your selected files and transports them into Photoshop and places each one of them in the same tab, but as different layers.

Okay, you also said that you handheld your camera, which means that these photos are in no way aligned. We'll need to fix that. To do so, click the first layer in your Photoshop file, hold down the Shift key on your keyboard and then click on the last layer. All layers should be selected. Then, head up to the Edit > Auto-Align Layers menu item. Select that one and then, when the box opens, click the OK button. Don't worry about any of the settings in that box. Auto is fine.

For the next step, you'll need your layers to be contained in a Smart Object, so go ahead and select all your layers again (if they're not still selected) and then right-click on any one of them and then choose the Convert to Smart Object option. And finally, go to the Layer > Smart Objects > Stack Mode > Median menu item and choose that option. What this command does is calculate what's inside of each layer and then average the pixels therein. So if there's sidewalk, ground or building in four of your photos, but a person standing there in the fifth photo, that person will be averaged out by the others. After taking this step, you should see most of the people in your images disappear.

I'm sure all of the people won't disappear though so you'll need to continue on with a few more steps. I know, this is a long process, but like I said, once you get used to it, it becomes like second nature.

To remove the lingering humans, double-click on the Smart Object thumbnail in your file. Then, when the new tab opens, find the layer that contains the offending person or people. Select that layer and then click on the Add Layer Mask button down at the bottom of the Layers panel. Mask out those people and when you do, you'll see the areas that you photographed, void of them altogether. Finally, if there are any artifacts left over that you want to get rid of, you can click to select the top layer and then use the Spot Healing Brush Tool to brush those areas away. Just be sure to have the Sample All Layers box in the options bar checked because if you don't, you'll only be affecting the very top layer with your brushing. You want to have an effect on all the layers.

When you're all finished and when you're happy with your results, close the tab that contains the individual layers. Photoshop will ask you if you want to save it. Click to save and then your file with the Smart Object in it will update automatically.

I know this seems complicated, so please ask me if you have any questions. You can also read through the post I wrote on the blog that discusses this topic. I include screenshots of much of what I covered here, over there. Thanks!
 
Top