Photoshop: Background Subtract method for masking

  • 1
  • Idea
  • Updated 1 year ago
  • (Edited)
At the Postal Museum we're working with photogrammetry, however this requires precise masking out of the background. I place the camera on a tripod in our studio, set to manual exposure, take an exposure of the 'background', then bring the object into the scene and start to photograph it from all angles.If I bring a 'background' photograph into photoshop and then drag an 'object' photograph into the layer on top of it then select my blending mode to 'subtract' this creates an effect where by the pixels that are the same in both images are black and the pixels that are different (so, only the pixels reresenting the object) are visible. It would be an amazing method of masking if the pixels that are the same were rendered black and the pixels that are different were rendered white. Then it would be possible to create a layer mask from this by using the 'image - 'apply image' tool.This would be a faster and more accurate masking method than any form of magic-wand tool or chroma-key masking.Similar methods are possible in video-editing software, and i'm sure would be amazingly helpful to me and many othersMany ThanksAndrew
Photo of

  • 1 Post
  • 0 Reply Likes

Posted 1 year ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13621 Posts
  • 1541 Reply Likes
Could you do this by using a difference blend mode between the two layers/shots? The areas that are the same turn black and the areas that are different have some intermediate tones that could be eliminated with an adjustment and used as a mask. With an action, the steps to do this could be automated.
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 735 Posts
  • 140 Reply Likes
I was looking for something similar.
I can do screenshot of webpage with extension but background can't be transparent. But I can set any color for background. So I could find differences and convert it into mask. But I couldn't find anything usable in Photoshop because I need corect alpha and colors for shadows ect.

I was thinking about my own algorithm with modifing GIMP color to transparency algorithm: it can be done in browser or in Photoshop C++ plugin.