How to overlay an image on Kinect Video RRS feed

  • Question

  • Hi,

    I m trying to place an image on the colour frame of the Kinect live video. I m able to overlay the image using alpha blending mechanism.The IDE used is Visual Studio Professional 2010. The code is developed in C++.I m not using any MFCs in the code. I am using Direct2D Texture.

    The image used is a bitmap image of dimension 128*128.

    The Kinect has a resolution of 640*480.

    The Kinect has a render target whose size is taken as 640*480 so that it stretches for the complete window. So when I try to overlay the image it appears 5 times because of this stretching.

    If I increase the image size to 640*128 i get a single image that is stretched horizontally across the window with dimension 640*480.

    I have created a function that will create a render target with bitmap properties and size equal to 640*480. This is used to store the data from the Kinect, frame by frame, and draw it on to the screen

    So I think when I overlay the image, it gets replicated 5 times to meet the render target size.

    By default the image is placed at the left top position.

    My doubts are:

    •  How can I use different functions to specify the size of render target for Kinect as 640*480 and the size of render target for bitmap image as 128*128.
    • How to I give overlay or place the image on the live video at a specific location.

    Thankx a ton in advance.



    • Moved by Jesse Jiang Friday, December 14, 2012 9:24 AM (From:Visual C++ General)
    Tuesday, December 11, 2012 2:45 AM

All replies

  • Your issue is about DX? DX is not suitable here.

    Please not forget mark your answer, and unmark your disagreed point.

    Wednesday, December 12, 2012 5:58 AM
  • Hi Vivekmk,

    Based on your description, your issue is about Kinect, so I will move the thread to General Discussion—Kinect for Windows SDK .

    Thanks for your understanding.


    Elegentin Xie
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 14, 2012 9:27 AM
  • In the sdk their is a sample in v1.6 for having a picture taken with in front of a green screen with a specific picture in it called "green screen" I think. It should be close enough that you can modify it without going through major code changes.

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog -

    • Proposed as answer by The Thinker Friday, December 14, 2012 8:51 PM
    Friday, December 14, 2012 8:51 PM