2

Someone asked me a Photoshop question the other day, and after some time thinking on it I couldn't come up with an answer - hoping someone here can shed some light!

Let's say I've got a batch of photos of people all standing in front of the same textured background - for example, headshots against a studio background. If I wanted to remove the background from all these photos, there are a few ways to go about it; the problem is all methods I know are manual, and large batches become pretty tedious.

Now, let's say the background in each photo was stationary (maybe a few px of wobble), and I had a photo of the complete background without any figure blocking it. Would there be a way to use the complete background as some sort of inverse/subtractive mask, so all you're left with is the person? At the heart of it, this is about automating the process of removing the same background from every image - so any alternate methods are welcome too. Thanks in advance!

3

What you are looking for is known as a difference mask, difference key, or difference matte. To get clean results, you'll need a very stationary background.

I'm not the best at creating actions, but here is the sequence I was able to come up with. This assumes you start out with the foreground layer as "Layer 2" and the background layer as "Layer 1".

Difference mask action Layer panel screenshot

Here's the action in ... action:

Difference mask script

And here's a link to download it (test images 1, 2). Anyone more proficient than I with actions can feel free to suggest ways to improve that


Laptop and garden photos courtesy of publicdomainpictures.net

  • Is there anyway to get this download going again? The link is broken. – Dallas Jun 5 '18 at 20:05
  • @Dallas I've fixed the link, thanks for the heads up – JohnB Jun 6 '18 at 14:06
0

Best way to do this is by creating an action.

Do it once in a procedural way (so no pentooling) with selection methods and then play the action for the other images.

  • Thanks for the tip! I'm aware of Actions as a method for automation - my question is more along the lines of what selection methods to use inside that action. Sorry if that wasn't clear. – CodeMoose Jan 29 '15 at 14:16
  • Try color range for that. Then refine edge on the mask of the subject. These settings should be correct for the other image as well, if the shooting set-up didnt change too much. – user37657 Jan 29 '15 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.