Kinect as a Greenscreen

While looking for an old project on my hard drive, I happened to stumble upon a different project – A Kinect-enabled green-screen that I wrote months ago. The idea is it uses a user-defined threshold to determine what pixels to replace. The default is 2000mm, or 2m. Any pixel closer than that is counted as ‘foreground’, and the corresponding background-image-pixel will be replaced with┬áthe pixel from the Kinect camera. This method has a massive advantage: No special lighting, background, or equipment is needed. Not even a flat wall is needed!

Of course, I wrote the program as a proof of concept more than anything. As such, there is no option to record – It just presents the modified image in real time. In fact, many variables that are now customizable through the GUI could only be changed within the code before I rediscovered the project and decided to improve it slightly.

The code can be found here.

Of course, feel free to contribute. I’ve included a TODO list of features that I’ve neglected to add.

Leave a Reply

Your email address will not be published. Required fields are marked *