Hey guys!
I was wondering - Is it possible to key out green screen from video
and replace it with a picture?
In a result I imagined that the video is still playing, but all the green space is filled with my picture file.
Hey guys!
I was wondering - Is it possible to key out green screen from video
and replace it with a picture?
In a result I imagined that the video is still playing, but all the green space is filled with my picture file.
This is called chroma key. Check this: https://forum.processing.org/two/discussion/comment/104666/#Comment_104666
Kf
There are several ways to solve the problem of green screen / chroma key to do background replacement.
The basic approach is to check for a specific color value or small value range in image A and, when you find it, replace that pixel from the same pixel in image B. This can apply to image-image, image-video, video-image, or video-video.
There are a lot of past conversations about doing chroma key in Processing.
Three basic approaches to making this happen in code:
In addition, there are two ways of checking the value for approaches 1 and 2:
red()
green()
and blue()
, which is slow>>
right shift, which is fast.