none
Kinect: How to insert an image in the background of Skeletal Viewer so that it is not black? (in C++) RRS feed

  • Question

  • This is probably the most basic questions on this forum, sorry.  I am just learning basic programming (beginner).

    I want to insert an image (jpeg) into the background of the skeletal viewer app in C++ code.  I have managed to get it to output xyz coordinates into a text file (that was hard enough!).  Now I want to see if I can simply change the default black background in the skeletal frame window to instead display any image I choose.

    I understand that I need to add a few lines of code somewhere to call the picture file, but I don't know where to add this code or what the code should be.  I know that I will have to save an image file to the source code directory and name it the same as what I call for in the code.

    Anyone willing to help?  It would be greatly appreciated!

    (Just like Green Screen but with skeletal frame instead of rbg camera display)

    Thank you,

    Ben

    • Edited by Bennoah9 Saturday, June 30, 2012 9:55 PM
    Saturday, June 30, 2012 9:52 PM

All replies

  • I haven't tried, but can't you use some of the same code from the GreenScreen-D2D sample for the background?
    Wednesday, July 4, 2012 8:19 PM
  • I will try, it seems that the code needed is longer than I had expected... I will need to upload image as a resource and then render it into the background, not a simple cut and paste - need to declare all the right variables and such before hand.

    I am just learning to program so it may take me a while to figure it out...

    Tuesday, July 10, 2012 4:48 PM
  • So I got it to kind of work.  Right now I have integrated all of the SkeletonBasic functions into the GreenScreen App. The problem is that the output with Direct2 is now two individual outputs,giving me a window that looks like a strobe light. This is happening because every other 1/30th of a second the display is showing a different output stream.

    But I do get a green screen with both the rbg camera feed and the skeletal frame all in one!  now to figure out this strobing issue...I am not too famliliar with Direct2 so I need some help with that.

    My question is: does anyone know of a good source that teaches the basics of using Direct2?  My main goal was to simply display a background image behind the skeletal frame in the SkeletalBasics app.

    It seems most websites are simply not helpful, lots of smart people don't know how to properly communicate so their wisdom goes it goes to waste.

    Tuesday, July 24, 2012 2:27 PM