description
A busy street or crowded tourist spot doesn’t have to ruin a photo, as long as a handful of frames are shot from a locked-down tripod first. This tutorial covers the manual way to remove a moving object with a layer mask, then the far faster automatic method using Photoshop’s Statistics script and Median stack mode, which analyzes several frames at once and erases anything that changes between them.
Enjoying This Free Tutorial?
We publish a new free tutorial every week, each one with sample images and PSDs you can download and follow along with. Sign up and they land straight in your inbox, along with early word on sales, events and subscriber-only offers.


A busy street or crowded tourist spot doesn’t have to ruin a photo, as long as a handful of frames are shot from a locked-down tripod first. This tutorial covers the manual way to remove a moving object with a layer mask, then the far faster automatic method using Photoshop’s Statistics script, which analyzes several frames at once and erases anything that changes between them.
Shooting Multiple Frames on a Tripod
A steady tripod keeps the camera’s framing identical across every shot, which is what both the manual and automatic removal methods depend on.
-
Mount the Camera on a Tripod
Set the camera on a tripod so its position stays completely fixed between shots.
-
Capture Several Frames of the Same Scene
Take a series of photos of the same scene over time, letting moving objects like people or cars end up in different positions in each frame.
Loading Files Into a Stack for the Manual Method
Loading a set of frames as a stack of layers in one document is the starting point for manually comparing and erasing unwanted objects.
-
Open Load Files Into Stack
Go to File > Scripts > Load Files into Stack.
-
Browse for the Source Images
Click Browse, select the full set of tripod-shot frames, and click Open.
-
Load the Images as Layers
Click OK to load every selected image as its own layer in a single document.
Removing an Object Manually With a Layer Mask
Comparing layers to find one where a specific spot is clear, then masking that clear area in, removes one unwanted object at a time.
-
Toggle Layers to Find a Clear Frame
Turn layers on and off to find a frame where a particular unwanted object, like a car, isn’t present in a given spot.
-
Paint Black on the Layer Mask
Add a layer mask to the layer with the unwanted object, select the Brush tool at 100% black, and paint over the object on the mask to reveal the clear layer beneath.
Opening the Statistics Script for the Automatic Method
The Statistics script offers a much faster alternative to manual masking, automatically comparing every frame at once instead of one object at a time.
-
Open the Statistics Script
Go to File > Scripts > Statistics.
-
Browse for the Same Source Images
Click Browse and select the same set of tripod-shot frames used earlier.
Choosing Median as the Stack Mode
The Stack Mode dropdown’s Median option is what actually identifies and removes anything that changes between frames.
-
Open the Stack Mode Dropdown
Click the Stack Mode dropdown to see the available comparison options.
-
Select Median
Choose Median from the list of options.
Why Median Stack Mode Removes Moving Objects
Median stack mode looks at every pixel position across all the loaded frames and keeps the middle value of all the frames at that position, so anything that appears there only briefly is left out. A moving car or person only occupies any given spot in a small number of frames, so the median calculation effectively treats it as noise and replaces it with the background that was actually there most of the time.
Aligning Source Images Automatically
Checking the automatic alignment option compensates for any tiny shift between frames, keeping the median calculation accurate.
-
Check Attempt to Automatically Align Source Images
Check the option to automatically align the source images before Photoshop calculates the result.
-
Confirm and Process
Click OK and let Photoshop process the images, which can take a moment depending on how many frames were loaded.
Why a Tripod Is Still Essential Even With Auto-Align
Automatic alignment can correct for very small shifts between handheld or slightly bumped frames, but it isn’t a substitute for a genuinely locked-down shot. Starting from a tripod keeps every frame’s composition as close to identical as possible from the outset, which gives the alignment and median calculation the best possible foundation to work from.
Reviewing the Automatic Result
The finished result appears as a single layer with every moving object automatically erased, without any manual masking required.
-
Review the Cleaned-Up Image
Examine the resulting image to confirm that moving objects, like cars or pedestrians, have been removed from the scene.
Examining the Result as a Smart Object
The Statistics script automatically packages its result as a Smart Object, keeping every source frame available for reference.
-
Double-Click the Smart Object
Double-click the resulting Smart Object layer to open the set of source files used to create it.
-
Close the Smart Object Without Saving Changes
Press Cmd/Ctrl+W to close the Smart Object’s contents once finished reviewing them.
Why the Result Comes Back as a Smart Object
Packaging the result as a Smart Object keeps every original source frame linked and accessible, rather than permanently flattening them into a single static layer. That means the settings or source images could theoretically be revisited later, without having to reload and reprocess every frame from scratch.
Why This Approach Works
Shooting from a fixed tripod is what gives the Statistics script a set of frames it can meaningfully compare pixel by pixel, since any camera movement between shots would make the median calculation unreliable. Median stack mode automates what a layer mask would otherwise require doing manually and repeatedly, identifying and discarding anything that only briefly appears in a small number of frames. Packaging the result as a Smart Object keeps every source frame available, so the whole process stays flexible rather than permanently committing to one flattened result.
Final Thoughts
The manual layer-mask method still has its place for removing just one or two objects, but the Statistics script’s automatic median calculation turns a genuinely tedious task into something Photoshop handles almost entirely on its own. Next time a busy street or crowded landmark threatens to ruin a shot, a tripod and a handful of frames are really all it takes to get it back to empty.
Quick Reference: Keys, Menus and Settings
- ShootCamera on a tripod, a series of frames of the same scene
- Manual stackFile > Scripts > Load Files into Stack, Browse, OK
- Mask by handLayer mask, B, paint 100% black over the object
- AutomaticFile > Scripts > Statistics, Stack Mode: Median
- Line up framesAttempt to Automatically Align Source Images checked
- Check the framesDouble-click the Smart Object; Cmd/Ctrl + W to close without saving
No AI, no generative credits.
Removing Moving Objects: Common Questions
Do I need a tripod for this?
Yes. The camera has to stay still so every frame lines up and only the moving objects change. Attempt to Automatically Align Source Images helps, but it doesn’t replace the tripod.
How many photos should I take?
Enough that every spot in the scene is clear in most of the frames. In a very busy place that can mean taking photo after photo for a long time; the video uses a series of shots of cars on Lake Shore Drive in Chicago.
How do I remove one or two objects by hand?
Go to File > Scripts > Load Files into Stack, browse to your frames and click OK. Turn layers on and off to find one where the spot is clear, add a layer mask to the layer above and paint black over the object.
Where is the automatic method?
File > Scripts > Statistics. Set Stack Mode to Median, click Browse, choose the same frames, check Attempt to Automatically Align Source Images and click OK.
Why choose Median?
Median finds the areas that differ from frame to frame and removes those differences, so anything that passes through a spot only briefly is dropped.
Do I still have to mask anything with the Statistics script?
No. Photoshop does the comparison and gives you the cleaned-up image; there is no layer masking involved.
What kinds of things can it remove?
Anything that moves between frames, like cars on a road or people walking through a busy tourist spot. Things that stay put in every frame stay in the photo.
Why is the result a Smart Object?
The script packs the frames into a Smart Object. Double-click it to see the files used to make it, then press Cmd/Ctrl + W and close it without saving.
From the Magazine View all
Stories, interviews and guides for photographers, new every week.
BusinessHow to Compete With AI: Give Your Clients MoreEveryone has the same tools now, and your clients know it. The way to compete is to give them more.
EditingLightCraft vs Lightroom: Is the Free Clone Any Good?The free clone on the same RAW files: what matches, what breaks and who should switch.
EditingHow to Tell If a Photo Is AI, and Prove Yours Is RealThe tells that still work in 2026, why detectors disagree, and how to prove your own photos.
Master Photoshop, Lightroom and Photography
Join PHLEARN PRO for $12.99 a month, or $99.99 a year (save 36%). Cancel anytime, with a 100% money-back guarantee.
