Isolate image from background and superimpose

Jan 26, 2011 at 10:04am

Isolate image from background and superimpose

Hi all,

I have isolated a live camera image from the background using jit.op absdiff. The resulting image is unusable, therefore I am looking for a way to superimpose the original camera matrix on top of it, perhaps by turning the black part of the absdiff matrix to alpha.

What I essentially want to be able to do is see whoever is in front of the camera without the background, and be able to put whatever I want in that background, 3d models for instance. Any help would be appreciated!


Jan 27, 2011 at 3:11am

Perhaps post your patch for more specific help? Tried something like jit.lumakey or jit.alphablend for isolating the black areas?

Sep 25, 2013 at 11:31am

Hey folks, I know this is an old thread, but I am trying to do the same thing. Anyone come up with a good solution?

Oct 1, 2013 at 11:23am

Okay so I am trying to figure this one out. I would appreciate any feedback.

I looked in to both jit.lumakey and jit.alphablend, they are not quite what I think is needed. Here is my test patch so far…


– Pasted Max Patch, click to expand. –


I think the problem is a little more complicated. These are the steps I really need to do…

1. take a video clip that has motion in the foreground and a static background.
2. I want to create a mask of the background (maybe alphamask or chorma mask)
3. Composite in a new background using the mask I created.
4. Overlay the captured foreground delta of the original clip to cover any anomalies.

Does this sound right?

Oct 1, 2013 at 1:32pm

plenty of techniques found on the forum by searching background subtraction.

here’s one:


– Pasted Max Patch, click to expand. –



You must be logged in to reply to this topic.