cl_ color and background image keying (Composition by dust)

Author: dust
License: (unknown)
Date: 2011.02.28
Compatibility: 10.6
Required plugins:

here is a cl color key. erases color in scene. there is also a background removal like in photo both. you take a background image then use that to key.

dust_key.qtz2.32 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

zqpm1qaz's picture
Re: cl_ color and background image keying (Composition by dust)

very nice ptach still working in 10.9 mac pro.thanks!

dust's picture
Re: cl_ color and background image keying (Composition by dust)

cool, it seems to still be working on 10.10 for me as well. i found depending on background and lighting that some good results can come from this patch.

vj dobermann's picture
Re: cl_ color and background image keying (Composition by dust)

Hi could someone explain me how works the background removal please ???

thanks in advance

Achim Breidenbach's picture
Re: cl_ color and background image keying (Composition by dust)

In the composition there is a "Screen shot..." image on the left side. This image is used as "background" to key out. If you want to do your own background, you somehow need to replace this image. In a quick shot I used a "Sample & Hold" patch to capture the "Video Input" Image output and connected the "Sample & Hold" Value output to the "Image" input of the "Image Resize" patch. This is how I get it to work, however I can't explain the math behind it.

johnsnows's picture
Re: cl_ color and background image keying (Composition by dust)

Is there any chance to do that in general? I would like to try that out on my work on Mars. The two planets as in the picture should move to each other.

dust's picture
Re: cl_ color and background image keying (Composition by dust)

this is key is pretty primitive and using the chromatic distance and a threshold to erase rgbw. distance is just subtraction, p2-p1/∆t so the math is pretty simple. euclidien distance uses sqaure root √((p2-p1)ˆ2)+((p1-p2)ˆ2) same as Pythagorean ∑≈ƒi(0-9)≈√((p2i-p1i)ˆ2). which is what opencl fast_distance vector function uses. so finding the distance between the (video RGBW - color key RGBW) and seeing if it is less than a threshold distance. open cl RGBW is 0-1 not 0-255; so in unit space, the threshold would be bound 0-1.

the background image works the same as the color key. the single kernel is background or color and not both but you could duplicate the code in the kernel or duplicate the macro to color key and background subtract at the same time. actually chaining multiple color key and background image blur subtractions then using lighting for spill suppression if needed. what you are saying using some type of automation sample and hold freeze frame for the background image was implicitly intended, but also necessary to remove yourself from the background image to subtract. a minimal implementation yes; but effective.

with proper lighting, the single kernel's example color subtraction mode should work in real-time without a green screen. i was able to subtract a white office wall in daylight on an old air book. with my glasses off, my pupils would subtract out because of the white color. preferably a color screen your not wearing, with multiple point lighting and cylclorama should produce a workable key. my intention was for it to be used as a photo booth type of effect, however im not sure if you can qc patches to do that anymore.

dust's picture
Re: cl_ color and background image keying (Composition by dust)

john chain the patches together to remove multiple colors and try blurring the background image. it would be the room your in without you in the picture. if on a solid color wall a background and a couple color keys should mask you out with a webcam. not sure what picture you are referring to about mars. here is a kepler orbital and molecular lenard jones inter automatic model.

it is a 4D ∆t step so the model looks more like our galaxy would after we merge with our binary galaxy ? meaning the orbital isn't stuck to the ecliptic. the sun would be at 0,0,0,0. to make it orbit like mars you would want to just use a pi x pi ∆t step on x axis for the kepler model to push into orbit. you could also add an input for the sun at 0,0,0,0, and chain another inertial system to make two moving planets orbit around each other. one of the patches runs the molecular system through a kepler orbit, so the molecules are orbiting but when they hit the edge of infinite space they wrap around like 4D Pacman.

don't ask; i know its supposed to be 3 space components and one imaginary time step 4th component for relativistic spacetime. i like more dimensions of time, separated from space. for what ever reason i think time propagates in all directions, in multiple dimensions with destiny and free will. like there is a probability of a spatial time trajectory that has a causal relationship with free will and natural nonlocal dissipative ordered entanglements.

Kepler Orbit Lenard Jones.qtz876.25 KB
lenardJonesPotential copy.qtz31.38 KB
orbitz.qtz1.34 MB