background subtraction live camera video

drifting's icon

I have two cameras recording two separate videos
I would like to subtract the background in both videos and only leave the people in the video remain. After subtraction, I would like the background of the video to be transparent (like a .PNG pic). I tried a few patches here but all the patches make the background black instead of transparent.
question 1: how to make the background transparent
question 1: once the background in both videos are subtracted and being transparent. How to add the two videos together and make a third video? (i guess i can use jit.op?)

drifting's icon

please help! or this is impossible to do? Thanks

cap10subtext's icon

Hard to comment without seeing a patch.

I don't know how to check if a video has a transparent alpha channel short of putting it into something like flash and seeing which parts disappear. I don't have much experience with video transparency. But the experience I do have is simply making a simple alpha channel with jit.matrix @planemap 2123 (making something like the green channel your alpha info), then when you do an alpha blend, boost the Alpha plane with jit.scalebias @ascale 50 (or more) to make it less ghostly.

HTH

Andrew Benson's icon

Background subtraction is complicated, but you can use objects like jit.chromakey or jit.lumakey to do simple keying if you have a solid-colored backdrop. There are a couple of Jitter Recipes that deal in alpha channel creation and usage. I'd recommend checking those out. For the actual blending, you might check out jit.alphablend or using OpenGL.

AB

drifting's icon

Thank you Cap 10subtext and Andrew Benson for the help.
I subtracted the background by using jit.chromakey and jit.gl.slab. And superimposed two videos using jit.gl.videoplane

Luis Marques's icon

Reviving an old post...

I'm planning do the same as you did. Have you successful accomplished blending one video and live camera? Can you help me whit some tips?

Thanks

Luis Marques

Luis Marques's icon
MJ's icon

jit.op would do .