none
InteropBitmaps for Kinect Depth view and WPF. RRS feed

  • Question

  • In the new SDK the skeleton view example uses Microsoft.Samples.Kinect.WpfViewers to display depth and RGB data. What is the difference between that and bitmapsource from the previous examples? Is there a difference in performance when using either one? Also, what is the proper way to use it in a project? So far I've resorted to the following, but I'm not exactly sure that the function of imageHelper is. Thank you,

     

    image_Kinect = e.ImageFrame.Image;

    if (imageHelper == null)

    {

    imageHelper = new InteropBitmapHelper(image_Kinect.Width, image_Kinect.Height, image_Kinect.Bits);

    im_kinect.Source = imageHelper.InteropBitmap;

    }

    else

    {

    imageHelper.UpdateBits(image_Kinect.Bits);

    im_kinect.Source = imageHelper.InteropBitmap;

    }

    • Edited by Maxyme Tuesday, December 6, 2011 3:10 PM code
    Tuesday, December 6, 2011 2:38 PM

All replies

  • There's a comment in KinectColorViewer,

                //An interopBitmap is a WPF construct that enables resetting the Bits of the image.
                //This is more efficient than doing a BitmapSource.Create call every frame.
    so it's just a more efficient way of going from a PlanarImage to an ImageSource.

    • Proposed as answer by ykbharat Sunday, May 6, 2012 12:21 PM
    Wednesday, December 7, 2011 9:36 PM