The steps to implement the green screen have now changed because of the alignment problem of color and depth images. Instead of directly blending the depth and color images, we will first construct a new texture for storing remapped colors (and use the player index to subtract the background colors). Then we will display the new texture on screen, which can be treated as the result of background removal.
This time we will use an inbuilt Kinect API method to align the color data with depth and combine them again. Let's start now: