none
missing CopyDepthImagePixelData() documentation RRS feed

  • Question

  • Where is the documenation for CopyDepthImagePixelData()?

    I used Bing search of MSDN and walking the reference myself. I see no CopyDepthImagePixelData() documentation.


    --Dale

    Wednesday, October 10, 2012 3:15 PM

Answers

  • You are correct, the reference page is actually called CopyDepthImagePixelDataTo(). It is a member of the DepthImageFrame class.

    -- Kris

    Monday, October 15, 2012 9:03 PM
  • I agree the documentation is sparse on the msdn site even if your looking in the right place. 

    The CopyDepthImagePixelDataTo function is dirt simple here is a little code for you to help you on your way: 

    //Class Global Var DepthImagePixel[] depthPixelData; //Initializing Kinect Area void InitializeKinect(KinectSensor sensor) { sensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30); depthPixelData = new DepthImagePixel[sensor.DepthStream.FramePixelDataLength]; sensor.AllFramesReady += sensor_AllFramesReady; sensor.Start(); } //AllFramesReady Handler void sensor_AllFramesReady(object sender, AllFramesReadyEventArgs e) { DepthImageFrame DepthFrame = e.OpenDepthImageFrame(); if (DepthFrame != null) { DepthFrame.CopyDepthImagePixelDataTo(depthPixelData); // this is the call in question foreach (DepthImagePixel pixel in depthPixelData) { if (pixel.IsKnownDepth && pixel.PlayerIndex > 1) //using some of the extended properties "Look Ma no Bitmask!" { // draw some users } else { // draw some background } }

    }


    Hope this helps. 

    Friday, October 19, 2012 2:12 AM

All replies

  • You are correct, the reference page is actually called CopyDepthImagePixelDataTo(). It is a member of the DepthImageFrame class.

    -- Kris

    Monday, October 15, 2012 9:03 PM
  • I agree the documentation is sparse on the msdn site even if your looking in the right place. 

    The CopyDepthImagePixelDataTo function is dirt simple here is a little code for you to help you on your way: 

    //Class Global Var DepthImagePixel[] depthPixelData; //Initializing Kinect Area void InitializeKinect(KinectSensor sensor) { sensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30); depthPixelData = new DepthImagePixel[sensor.DepthStream.FramePixelDataLength]; sensor.AllFramesReady += sensor_AllFramesReady; sensor.Start(); } //AllFramesReady Handler void sensor_AllFramesReady(object sender, AllFramesReadyEventArgs e) { DepthImageFrame DepthFrame = e.OpenDepthImageFrame(); if (DepthFrame != null) { DepthFrame.CopyDepthImagePixelDataTo(depthPixelData); // this is the call in question foreach (DepthImagePixel pixel in depthPixelData) { if (pixel.IsKnownDepth && pixel.PlayerIndex > 1) //using some of the extended properties "Look Ma no Bitmask!" { // draw some users } else { // draw some background } }

    }


    Hope this helps. 

    Friday, October 19, 2012 2:12 AM