0

Here is what I have:

  1. image with an object and a background behind it.
  2. same background without an object.

Example bellow: example

I want to get the difference between image 1 and image 2, which in this case is: final result

Since I have quite a lot of different pictures that I work with, in my case tools like "Magic Wand" or similar don't always work well because of the similarity of the colors of the background and the object. Are there any "smart" ways I can work around this?

6
  • Trying to use a difference blending mode layer will not work for what you are trying to do. The newest version of Photoshop 2024 has AI assisted (Cloud based) Select Subject functionality. Then once you have a selection you could just add a layer mask. That's probably your best bet.
    – Billy Kerr
    Nov 8, 2023 at 16:05
  • "Difference keying" is something that exists, but usually in video editing software such as After Effects (it's called Difference Matte in AE). It relies on having static background and moving subject, and having two shots of the same scene. As far as I know, there's nothing like this for Photoshop.
    – Billy Kerr
    Nov 8, 2023 at 16:41
  • The opposite is possible. But I don't believe there's a bulletproof way of automating this. The object probably has transparent along the edges for antialiasing. How should the algorithm treat them? See how different they are from the background perhaps? But then every pixel of the object would get some transparency because they are all at some distance from the background. And what if there are pixels in the object that by coincidence have the same color as the background?
    – Wolff
    Nov 9, 2023 at 19:05
  • This is almost a duplicate of your question although yours is more open and don't suggest a specific solution, so I won't vote to close this as a duplicate.
    – Wolff
    Nov 9, 2023 at 19:11
  • @Wolff no its not. This ones easy all you really need is to use calculations and then a curves and its done.
    – joojaa
    Nov 9, 2023 at 21:09

2 Answers 2

1

This is quick and dirty: If you place the two layers over one another, with the upper layer mode set to difference you'll get this

difference

Then use colour range to select the black. Invert that selection and then switch off the top layer. use that selection to isolate the "people" layer. You'll get something like this:

Image difference

The edges may need cleaning up, but the bulk of the work is done. Is that what you're after?

0

I hope I am understanding your question correctly, but try using the Color Range Command on Photoshop.

You will first, roughly, select the portion you want to cut out (it is okay if some portions of the background are still selected), then go into the color range command and select the colors you want to keep. There is an icon on the bottom right of the command window that will allow you to "Add Samples" (add another color). This will allow you to select all colors that you want to keep, or not keep, based on your desired application. You can also adjust the fuzziness and range to determine how much leeway you are willing to give with the cut.

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.