Overlay an image into video from Kinect RRS feed

  • Question

  • Hi,

        I m trying to overlay an image on a live video produced using Microsoft Kinect. The IDE used is Visual Studio Professional 2010. The code is developed in C++.The video is displayed using Kinect. When I try to overlay image on the live video, I m not able to see the image. The video is running at 30 frames / sec. I m loading the image using a handle i.e.  


                           HANDLE hBitmap;            

                 hBitmap = LoadImage(NULL, L"C:\\Users\\User\\Documents\\Visual Studio 2010\\Projects\\ImageVirtual\\ImageVirtual\\BMP_Image.bmp",IMAGE_BITMAP, 0,0, LR_LOADFROMFILE );


    I have to load this image and overlay it on to the video at a specific location.


      I m passing the ID of a picture control, placed on the dialog box in the rc file, to the kinect to load the live video and display it. I m not using any MFCs in the code. The video is rendered by using Direct 2D mechanism

         I have the following doubts:

    ·         How to load and overlay the image on the live video at a specific location.

    ·         Is it possible to overlay image and video using the same picture control or is it necessary to use two different picture controls for image and video and then overlay the image over the video?


    NOTE :

           I m trying to overlay image on a video which is similar to the FaceTracking mechanism in Microsoft Kinect SDK.

    Looking forward for a positive response at the earliest.




    Tuesday, November 20, 2012 9:02 AM

All replies

  • are you trying to do something similar to Green Screening? If so, take a look at the C++ Green Screen-D2D sample in the latest toolkit.
    Thursday, November 22, 2012 3:35 AM
  • Hi,

    Thanks for ur response....It is not Green Screening but vice versa. I m trying to a overlay a static image on to the video. And I am using the mechanism of Alpha Rendering to overlay the image on to the video. Problem I have encountered is, The image is overlayed five times on to the video .

    For example , The Kinect resolution is 640*480 and bitmap image resolution is 128*128. If I take this bitmap , the video will produce five times of  overlayed image on to the video..

    I took the condition of image to be overlayed on video is the bitmap image size.


            I m using Microsoft Kinect SDK.

    Looking forward for a positive response.




    Friday, November 30, 2012 5:15 AM