Hi! This is quite hard to explain, I try my best. I have different videos as an input and I can switch between them. Now I want to key them with a Chroma Key TOP for example - but I only want to key so much, that exactly 50% of the input is gone (alpha) and the rest is still there. In other words, I want to delete the brightest half and keep the darkest half of pixels (or the most saturated half etc. - It doesn’t matter if the Key is based on brightness, saturation or hue).
This seems quite difficult because all the videos have a different overall brightness, hue and saturation.
Yes, its quite hard to understand…
I tried to give a solution:
– transform RGB to HSV (rgbhsv top), extract Value (channel b)
– calculate the median Value (analyse top with sum, divide by number of pixels
– create the alpha layer with GLSL top
– apply alpha layer to the image (reorder top) medianValue.toe (6.2 KB)
I actually found another way by splitting the input into several Chroma Key Partitions and then combining them back together. Probably have to see the file to understand what I mean.
I did it with 5 partitions but if you’d do it with like 20 then it’d be pretty close to this idea of slider=0.5 → 0.5 of the input is keyed.