How to take screenshot with overlayed image from the kinect running video. RRS feed

  • Question

  • I am trying to create the bmp file from the live running video using Kinect. I am developing an application which is running the live video on top of that to place an image. The IDE which I am used is Visual Studio Professional 2010. The code I am developing in C++ using win32. 

    . I want to save the video along with the overlayed image. Now I am using ID2D1Bitmap for displaying the bitmap in overlayed manner. But I have to retrieve the byte* data from the video with overlayed image. I am trying to create a bmp file which retrieve the byte* data from the ID2D1Bitmap. But the direct conversion does not possible to retrieve the byte* data.

                    m_pd2d1RenderTarget->DrawBitmap(m_pd2d1Bitmap_Video);                             m_pd2d1RenderTarget->DrawBitmap(m_pd2d1Bitmap_Image,D2D1::Rect(120,140, 120+Height,140+Width));

          I copied the data to the ID2D1Bitmap using the function called,

                   m_pd2d1RenderTarget->CopyFromMemory(NULL,pvideo_Data,video_Info.bmWidthBytes);                                                                             m_pd2d1RenderTarget->CopyFromMemory(NULL, pBitmap_Data,Bitmap_Info.bmWidthBytes);

           But Now I want to combine the both bitmaps and to get the byte* data of that. Is it possible to convert those bitmaps into byte*? Is it any direct conversion available to get the byte* data from ID2D1Bitmap???.  And also I am tried to convert the ID2D1Bitmap to IWICBitmap. Because with using IWICBitmap->Lock can retrieve the byte* content. So please help me to the following doubts and give the valuable guidance:

    1.Conversion of ID2D1Bitmap to byte*?.

    2.How to convert ID2D1Bitmap to IWICBitmap?.

                  Thanks in advance :)




    Wednesday, February 6, 2013 9:05 AM