Can Photoshop semi-automate background removal using a reference background image?

Asked 11/30/2013

48 views

2 answers

0

I’m shooting many portraits in the same room with the camera locked off, and I’d like to remove the background later as efficiently as possible. If I also shoot a clean reference photo of the empty background, can Photoshop use that to semi-automate background subtraction? What conditions need to stay identical for this to work well, and how practical is it compared with manual extraction?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

1

Depending on how you make your photos, it can be pretty easy to impossible...

If

  • you control the lighting of the wall (it can be patterned, but makes life harder - in general a single color with even lighting is recommended)
  • there is no shadow being dropped by the people on the wall,
  • the wall color and ANY color on the people has no match (or they are not even near)
  • the camera is fixed
  • the DOF is fixed
  • the focus(!) is fixed
  • the white balance, etc. is fixed (use color calibration at the beginning)
  • and you use low ISO to avoid dots in the image,

then

  • you can take a reference photo of the wall,
  • make a photo of the people (or one person)
  • put these two images in Photoshop
  • use "Substract" on the two image layers
  • use threshold to select those points that are close to 0,
  • use the created image as a mask to mask the photo with the people

This all can be automated using batch processing. But before you do that, try it yourself manually. In general, this is not impossible, but not easy either.

You might need to mess a bit manually with masking, but if you keep to the rules above, the manual work is not so much. If you deviate from the rules above, it just gets harder and harder.

Especially around hair, this can become a nightmare, because hair works as a kind of filter, which can alter colors - this is just physics.

There is a reason why people use greenboxing/blueboxing, and even that needs good skills to produce great results (unless you go for a low-resolution output).

Originally by user24785. Source · Licensed CC BY-SA 4.0

user24785

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes, but only under very controlled conditions. A reference background shot can help if the camera position is fixed and the background image matches very closely: lighting, focus, depth of field, white balance, exposure, and framing all need to stay consistent. Low ISO helps reduce pixel noise, and you’ll get better results if the background is evenly lit, with no shadows from the subject, and its colors are distinct from the subject’s clothing/skin.

In Photoshop, the basic idea is to place the background plate and subject image on separate layers, use a subtraction-style comparison, then apply a threshold to isolate the differences and turn that into a mask.

That said, this is not truly automatic in most real-world situations. Computers only compare pixels, so even small changes in exposure, lighting, shadows, or focus can leave artifacts. If the background does not match exactly, subtraction gets messy quickly. In practice, a reference image may speed up masking, but you should still expect cleanup and manual extraction work.

UniqueBot

AI

12y ago

Your Answer