Median stack mode: getting rid of people

Before we went away last week to Belgium, I was reading about a technique for removing people from your photos using Photoshop. I think I’d heard or read about it before way back when but had never really investigated the technique properly. This time though, I delved in deeper to see if I could do it myself. I suppose it was prompted by this short video that takes the technique to an extreme (notice how the shots with just the protagonist and no crowds are stationary/static so the technique can be applied).

In essence you take half a dozen shots of the same scene, at the same exposure, at the same focal length, at 5 second or so intervals, and then get Photoshop to “average out” the content of all the images, discarding those pixels that are not replicated among all the images. The theory is that passing people/cars/whatever are only present in one of the images and so would be discarded from the aggregate.

So while in Bruges I decided to try it out. Why Bruges? Because, holy cow, there were a gazillion people wandering around. Every photo I took had tourists in it.

My first attempt was just outside our hotel, facing down Oude Burg to Wollestraat at the end. A nice old merchant house from 1579. Since I didn’t have a tripod with me, I used a column on the building on the left to prop my camera on to minimize wobble. I took 9 photos (not that I was really counting) over a period of 30 or so seconds, trying to ensure that the people in view were moving across the scene.

Set of photos of Bruges Merchant House

Original photos of house

Later on, I imported them into Adobe Lightroom, selected the nine photos, and then right-clicked and selected Edit In…, then Open as Layers in Photoshop.

At this point I was ready to follow the steps detailed in the Photoshop Help. First step was to align the images, to remove the inevitable wobble as I took the photos. (Select > All Layers, followed by Edit > Auto-Align Layers | Auto). Next the images had to be gathered in to a Smart Object (Layer > Smart Objects > Convert to Smart Object). At this point, the magic was ready to be unleashed: selecting a Stack Mode (Layer > Smart Objects > Stack Mode). The one to use is Median to remove unwanted objects, such as people – in essence, the output color for a particular pixel is the median of all the pixels in the same position in the images.

Once that is done, you can rasterize the image stack and save it. Here’s the resulting image:

Bruges Merchant house (stacked)

Stacked photo of house

All told, not too bad. However, what I didn’t realize when taking the photos is that in the majority of the images had someone in the lower right corner. Yes, people were moving, but every time I happened to take a photo someone was around there. The stacked image therefore has “ghosts” in that corner. Something to bear in mind the next time I try this technique out.

The next day, I had another crack at it: taking a photo of the front door of the Provinciaal Hof in the Grote Markt. A nice sunny day with lots of people walking around. I took 10 photos this time and tried to space them out more. (My camera prop this time was a set of bleachers that had been erected in the Markt for the procession a couple of days before.)

Set of photos of Provinciaal Hof

Original photos of Provinciaal Hof

After importing them and running through the image stack process, the result was this:

Provinciaal Hof (stacked)

Stacked photo of Provinciaal Hof

Way better. In fact this time there are no ghosts at all: it just looked as if I had been extremely lucky and taken a photo when there were no passersby.

All in all, even though I only tried this technique twice with this particular vacation, I shall certainly be experimenting more with it in the future.


Album cover for The Jazzmasters 4Now playing:
The Jazzmasters - Visions of Illusion
(from The Jazzmasters 4)

Loading similar posts...   Loading links to posts on similar topics...

No Responses

Feel free to add a comment...

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response