<p>Haven't tried it, but this might work by dragging both shots in after effects, setting the layer with the subject to "difference", which shows the parts that are different. You can then pre-compose both layers, drag in the footage with the subject again, put it on top of the precomp and then add levels to the precomp, dragging the rgb curve up so that the image becomes only fully black and fully white, giving you the luma-mask for the subject. If you now set this precomp as the luma-mask for the shot with the subject, it should subtract only the subject and cut out the background.</p>

<p>Here are some reasons why this shouldn't be an alternative to greenscreens:</p>

<ul>
<li><p>You really need to make sure that the camera, as well as the background stays <em>exactly</em> the same for both shots. Any difference will produce bits you need to mask out using a garbage-mask.</p></li>
<li><p>Because nearly all cameras compress the captured images, those blocky compression-artifacts will get masked out as well. This might result in messy edges and ugly smudges, especially while moving rapidly.</p></li>
<li><p>When for example a hand is in rapid motion, the background will shine through the blurry hand, because the difference will detect it as if its a completely opaque foreground.</p></li>
</ul>

<p>Now some reasons for why you <em>should</em> use it under some circumstances:</p>

<ul>
<li>You won't have to deal with "spill", which is the color of the key-screen (usually green) that gets bounced onto your subject. Cleaning up spill isn't magic, but not having to think about this issue might save you some time.</li>
<li>You don't need to buy and set up a proper greenscreen, which - especially for indie-filmmakers - can be a pain in the rear.</li>
</ul>

<p>I hope I was able to help :)</p>

CC BY-SA 4.0
2019-03-06T23:45:08.363Z
Thanks for the response! Damn, that is annoying. So it'll only subtract if the camera is completely still (which I'm afraid won't be possible). There isn't any sort of tracking thing that allows for small camera movements and still a decent key?
Ansel Chang
CC BY-SA 4.0
2019-03-07T07:15:08.523Z
You can try to stabilize the footage using the warp stabilizer or a simple 2D tracker that is set to "stabilize". However, the movement in the initial footage will cause some blur and smears during movement, which will most likely show up in the difference comp as well. If you're planning on doing the same thing in the future, make sure to lock the camera down on a tripod (preferably a good, heavy one like the ones from manfrotto), and make sure not to move the camera at all.
Florian Claaßen
CC BY-SA 4.0
2019-03-06T16:43:24.647Z
2019-03-06T16:43:24.647Z
Florian Claaßen
<p>Another reason not to do it is noise - all video signals contain noise - if you look closely at a zoomed in image of a video clip, you will see that even areas that appear to be solid colours contain small variations over time, due to many different factors.  So even if two images seem similar, there will be constant small changes, making it harder to subtract the two images.</p>

CC BY-SA 4.0
2019-03-13T12:41:34.243Z
2019-03-13T12:41:34.243Z
tomh
<p>There's a built-in effect called <a href="https://helpx.adobe.com/after-effects/using/keying-effects.html#difference_matte_effect" rel="nofollow noreferrer">"Difference Matte"</a> which does what Florian describes.</p>

<p>Another one for the list of reasons not to use it: any foreground areas that are close in colour to the background will be partially (or fully) transparent. E.g. you have someone wearing a white shirt against a white wall—it's not going to work. Skin tones are pretty close to a lot of other colours in common environments, and things like highlights and shadows will also cause problems, because they tend towards white and black, just like the highlights and shadows in the BG plate.</p>

<p>There's a reason why green screen is much more commonly used than difference mattes. A bit more trouble to set up, but a lot better result.</p>

CC BY-SA 4.0
2019-03-13T02:20:05.147Z
2019-03-13T02:20:05.147Z
stib
<p>I have a camera set up in a room. I take a picture without any foreground as a clean slate. Then, I record a video with a moving foreground while the camera stays in the same position.</p>

<p>Is there any way I could use Adobe Premiere Pro or After Effects to "subtract" the clean slate from the footage so that it would key the background out, leaving only the foreground?</p>

<after-effects><premiere><chromakey>
"Subtracting" image with clean slate on Premiere Pro/After Effects
Ansel Chang
# "Subtracting" image with clean slate on Premiere Pro/After Effects

(Asked by: username_0 on 2019-03-05)

I have a camera set up in a room. I take a picture without any foreground as a clean slate. Then, I record a video with a moving foreground while the camera stays in the same position.

Is there any way I could use Adobe Premiere Pro or After Effects to "subtract" the clean slate from the footage so that it would key the background out, leaving only the foreground?

**Tags:** after-effects, premiere, chromakey


---

## 3 answers

### Answer by username_1 on 2019-03-06. Score: 2 | Accepted answer

Haven't tried it, but this might work by dragging both shots in after effects, setting the layer with the subject to "difference", which shows the parts that are different. You can then pre-compose both layers, drag in the footage with the subject again, put it on top of the precomp and then add levels to the precomp, dragging the rgb curve up so that the image becomes only fully black and fully white, giving you the luma-mask for the subject. If you now set this precomp as the luma-mask for the shot with the subject, it should subtract only the subject and cut out the background.

Here are some reasons why this shouldn't be an alternative to greenscreens:

* You really need to make sure that the camera, as well as the background stays *exactly* the same for both shots. Any difference will produce bits you need to mask out using a garbage-mask.
* Because nearly all cameras compress the captured images, those blocky compression-artifacts will get masked out as well. This might result in messy edges and ugly smudges, especially while moving rapidly.
* When for example a hand is in rapid motion, the background will shine through the blurry hand, because the difference will detect it as if its a completely opaque foreground.

Now some reasons for why you *should* use it under some circumstances:

* You won't have to deal with "spill", which is the color of the key-screen (usually green) that gets bounced onto your subject. Cleaning up spill isn't magic, but not having to think about this issue might save you some time.
* You don't need to buy and set up a proper greenscreen, which - especially for indie-filmmakers - can be a pain in the rear.

I hope I was able to help :)

> **Comments:**
> **username_0**: Thanks for the response! Damn, that is annoying. So it'll only subtract if the camera is completely still (which I'm afraid won't be possible). There isn't any sort of tracking thing that allows for small camera movements and still a decent key?  
> **username_1**: You can try to stabilize the footage using the warp stabilizer or a simple 2D tracker that is set to "stabilize". However, the movement in the initial footage will cause some blur and smears during movement, which will most likely show up in the difference comp as well. If you're planning on doing the same thing in the future, make sure to lock the camera down on a tripod (preferably a good, heavy one like the ones from manfrotto), and make sure not to move the camera at all.  

---

### Answer by username_2 on 2019-03-13. Score: 0

Another reason not to do it is noise - all video signals contain noise - if you look closely at a zoomed in image of a video clip, you will see that even areas that appear to be solid colours contain small variations over time, due to many different factors. So even if two images seem similar, there will be constant small changes, making it harder to subtract the two images.


---

### Answer by username_3 on 2019-03-13. Score: 0

There's a built-in effect called ["Difference Matte"](https://helpx.adobe.com/after-effects/using/keying-effects.html#difference_matte_effect) which does what Florian describes.

Another one for the list of reasons not to use it: any foreground areas that are close in colour to the background will be partially (or fully) transparent. E.g. you have someone wearing a white shirt against a white wall—it's not going to work. Skin tones are pretty close to a lot of other colours in common environments, and things like highlights and shadows will also cause problems, because they tend towards white and black, just like the highlights and shadows in the BG plate.

There's a reason why green screen is much more commonly used than difference mattes. A bit more trouble to set up, but a lot better result.


---

