View Single Post
Old 01-23-2023, 05:00 PM   #4
mla
Human being with feelings
 
Join Date: Jan 2013
Location: Canada
Posts: 321
Default

Quote:
Originally Posted by papagirafe View Post
Stock chromakey is hard to use and confusing. Just replace it with this version that allows you to mask out the unwanted parts as the first fx in your chain then add "overlay image" at the end of the chain and that should solve problem. Same project structure but you can eliminate the pure green track completely.

Code:
//Chroma-key(RGB) + mask out
//by papagirafe
//@param cl "mask left" 0 0 1 0.5 0.001
//@param cr "mask right" 0 0 1 0.5 0.001
//@param ct "mask top" 0 0 1 0.5 0.001
//@param cb "mask bottom" 0 0 1 0.5 0.001
//@param mode '0=green,1=blue' 0 0 1 0.5 1
//@param p primary 5.7 0 6 3 .01
//@param rej rejection 3 0 6 3 .01
//@param k3 threshold 0 -2 2 0 .01
//@param spill 'spill reduction' 0 0 1 0.5 1

in1=0;
in2=input_track(0);
colorspace='RGBA';
E=0xFFFE;
input_info(0,w,h)?(
  cl=(cl*w)&E;
  cr=(cr*w)&E;
  ct=(ct*h)&E;
  cb=(cb*h)&E;
  cx=cl;
  cy=ct;
  cw=w-(cl+cr);
  ch=h-(ct+cb); 
  gfx_set(0,1,0,1,0,-1,0);
  gfx_fillrect(0,0,w,h);
  mode>.5?(k1=-rej;k2=p; ):(k1=p; k2=-rej;);
  gfx_keyedblit(0,cx,cy,cw,ch,cx,cy,k1,k2,k3,spill);
);
Hi, thank you very much! Glad you are here , as last time you helped 100%.
I saved all the tips and screenshots from last troubleshooting.
Was sure it will work. But no way ...
What changed? My new green screen setup (different size and distance to it). So this is the main factor of the problem I guess.

Now... I did save your new code as preset, applied 3 presets in the order as previously, EXCLUDED green only track (that you mention).
Nothing works (see pics). I tried to play with all 3 presets and cannot even bring the saxman into the picture.

after trying different cropper software I found one that allows to do easy cropping.
Cropped video of saxman is on Green screen but the sides from surrounding are replaced by black. I think this cropping is not really helpful, so other techniques are required
Anyway, I cannot do anything with current presets.

I replace video track of saxman with a pic only.
I also attached project with new preset and background image.
Could you please apply your force/knowledge for trying to fix the situation.
What is your conclusion, would this initial green screen setup allow to do something useful?
Thanks again...

https://drive.google.com/drive/folde...usp=share_link
__________________
"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
mla is offline   Reply With Quote