I'm a long time user of Photoshop. Every time I want to cut out a subject I use the Pen tool and I do it manually. But now, I'm guessing if there isn't a faster way of doing by giving Photoshop a reference for the empty background so he can automaticaly mask everything that is not that reference on other pictures.

This technique, if it exists, would be perfect to make quick cut outs on subjects that are on the same background (not white background of course).

Here an exemple of what I mean. This the empty background This is the background with the subject

Now my question is, can I tell Photoshop that picture 1 is the background and it needs to remove it from picture 2. Any idea?

Thanks :)

  • Is there a reason to use the same floor, you have existing images and can't change the background, and a reason why you can't use black, white, or colored paper?
    – Rob
    Jan 15, 2019 at 13:41
  • I could use a white background but it requires a lot of setup. The reason here is because I'm doing photogrammetry and i need to shoot the object by rotating it slightly for each picture. Then I need to mask the subject and that would go faster if I could just tell Photoshop that this is the background, just remove it :) Jan 15, 2019 at 13:55
  • If the background were as I described you could do that, unfortunately it will be quite involved; so you'll need to wait for an answer about using the background that you have.
    – Rob
    Jan 15, 2019 at 14:18
  • it is caaled a difference keying. For still photography its rarely used because its so easy to shoot it properly
    – joojaa
    Jan 15, 2019 at 18:16
  • I would point out that the angle in the wood floor is different in both your photos. It's not really a match.
    – Scott
    Jan 15, 2019 at 20:17

3 Answers 3


Answer rewritten: At a glance that seems to work perfectly assuming you do not move the camera nor change the light. At screen resolution it's well possible that the movements are not a problem. But the light changes in the background when you insert an object, if there's not enough distance. At least in your photos the floor is definitely different near the object. That could be fixed by having some distance or a self-illuminating background.

There's another problem: Photoshop has no proper reasoning mechanism for "this is the same as in the plain floor image, so it's background". Photoshop's blending modes are calculated pixel by pixel and proper reasoning needs some area around every pixel. That's because a single pixel in the object can still be nearly same in both images or produce the same blending result.

Here's your images blended with mode divide:

enter image description here

We see following faults:

  • result is white also in the glossy areas of the object
  • the background is well present where the object changes background light
  • the background texturizes the object a little by division

Other blending modes will not help, subtract is even worse because the object is dark.

Actually one non-pixel by pixel reasoning method exists in Photoshop. We can detect edges and fill the outside or delete it (=fill with transparent). It will work if the resolution is high enough and there's no light differences An example:

Here's a fake version of your image, one without object's effect to background lightning:

enter image description here

Detecting edges -filter leaves only edges:

enter image description here

When the same is applied to the background and blending mode difference is selected, we get:

enter image description here

Black can be selected with magic wand. When one demands contiquous selection, that selection can be used to delete the background of the original image. The result:

enter image description here

Only one hitch: You should desaturate selectively with Image > Adjust > Hue & Saturation the background color from the object. It's disturbing when the background has vanished.

Of course this all is quite theoretical, because if you have a background which doesn't get affected by the object, you probably can make it also bright or dark enough to use traditional methods.

I suggest you accept traditional methods. It's not so difficult to take the photos properly for background removal. Have a featureless background (=uniformly lighted one) and take a silhouette photo against it. Take another photo with foreground lights on. Use the silhouette to make a selection for background removal. If you have a sturdy camera stand, you do not move your feet and you use timed shooting, the silhouette will be perfect enough even for high resolution images.

You will still need clipping paths, if the object is transparent or makes strong reflections.

Green or other color keying methods need plenty of room to prevent the background color polluting the object.

Not asked: Those of us who have made some tests around the question have surely got also this:

enter image description here

A perfect wooden camera! I bet this alone is worth the used time.

  • That's a nice trick here. I'll try :) Thanks ! I should try with a very flat light that casts very few shadows. Jan 15, 2019 at 13:55
  • 1
    @NicolasKalogeropoulos You could remove the background from the point cloud if it was fully sharp and you moved your camera. Get some gloss killing powder. Shiny areas produce non-predictable results in photogrammetry.
    – user82991
    Jan 15, 2019 at 14:06

Given your stated purpose of photogrammetry, I suggest:

  1. High quality, fixed background material beneath your photo subject - think photographer's table-top product photo platform


  2. a rotating camera rig


  3. multiple cameras on fixed rigs or tripods


  4. a fixed single camera and a high-quality lazy suzan type turntable

    They make those for table-top product photography, with a nice mid-light grey uniform material, and very smooth bearings... They also make small four-sided fabric tents for smaller product photos which give you both an underlay and a backdrop, and act as partial light diffusers too. They even make table-top mini cove studios as one moulded piece to give super-smooth cove curves at corners to avoid distracting shadows.

I would also suggest you consider a single-unit gridded surface for your backdrops - mid light grey overall(with a slightly lighter or darker grid unit set at say 5cm) or perhaps mid and lighter grey chequerboard at the same unit size, as this will allow you easy scale checks / corrections once you've imported your data into your 3D DCC (Digital Content Creation) application of choice.

Clearly, if you're going to high repeatability and quality, you'll end up wanting fixed photographer's lights and reflectors - I think you'll find you want pretty uniform and diffused light - probably still a three-point light setup, but the key should be almost as soft as the fill to avoid too much hotspotting.

Classic Product Photo Platform Alzo Photo Platform Alzo Large Photo Riser Ortery Turntable IconaSys 360 Turntable Classic Photo Tent Mini Photo Cove

NOTE: All product image references and following links are included herein to communicate equipment type exemplars, not to recommend specific manufacturer, model or vendor:

clear riser photo platform
Ortery PC 360 PhotoCapture 360 Product Turntable
Product Photography Turntable


Method 1. Difference.

This idea of auto masking can be achieved using a "Difference" blending mode and tweaking this image to be used as a mask. But the problem is that it also detects the shadow. I will post some examples later.

As a rough draft, I will use your images, but they are not working, because your illumination changed. But here it is.

Put one image on top of the other using "Difference" overlay mode.

enter image description here

Convert this image to grayscale.

enter image description here

As an additional step, I separated the RGB channels, of both images, and compared the differences on each channel. You can see that on the metal handlers I have more difference on one channel than others.

enter image description here

Then, I am combining these images using "If Lighter" to pop the whitest parts of each image.

enter image description here

But here I have the problem with your images:

Move the levels of the image... Oops. We can see that you did not take the photos with the exact same illumination. I think you were using ambient light. For this to work, the illumination of the background needs to be exactly the same.

enter image description here

Method 2 On the photo shoot. Backlight

One second method is to use a translucent white table (like the ones @GerardFella posted) and firing two different sets of flashes.

  • Photo 1 firing the ones illuminating the object.

  • Photo 2 firing only some flashes below the table, to produce a cutout silhouette of the object with a white background.

Then use this second image as a mask.

I recommend using remote controls, including the one firing the camera.

(I will edit this post later with some diagrams and some test shots. But I do not have the translucent white material right now)

  • Thank you for your answer and the time you took to make it ! Jan 16, 2019 at 18:11
  • I will edit it on the weekend with some practical tests.
    – Rafael
    Jan 16, 2019 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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