none
[C#] How to know the depth of all the pixels RRS feed

  • Question

  • Hello,

    I'm starter with Kinect SDK. I know that Kinect has depth sensor, and I think that it gives depth information for all the pixels from de image. I don't know how to get this depth information. I want to paint an image, giving color to pixels depending on the depth. I think that I have to implement Runtime.DepthFrameReady event and give a color to image pixel by pixel.

    Someone can help me?

    Thank you!

    Thursday, June 30, 2011 3:06 PM

Answers

  • This contains all the information you need:

     

    http://channel9.msdn.com/Series/KinectSDKQuickstarts/Working-with-Depth-Data

     

    You can download the code sample. Basically it will get the distance of each pixel, and you can use if statements to set the pixel to a certain color.

    Thursday, June 30, 2011 3:34 PM
  •  

    Hi Jon, 

    I would also strongly recommend you take a look at the C# SkeletonViewer sample code - as it does exactly what you are trying to do!  It assigns a grayscale color based on the depth value and displays the full image depth view in real time on the application window.  You could probably hijack what you need from the sample code for your own purposes. 

    You can find the sample application under: C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI

     


    Susan
    Thursday, June 30, 2011 6:09 PM

All replies

  • This contains all the information you need:

     

    http://channel9.msdn.com/Series/KinectSDKQuickstarts/Working-with-Depth-Data

     

    You can download the code sample. Basically it will get the distance of each pixel, and you can use if statements to set the pixel to a certain color.

    Thursday, June 30, 2011 3:34 PM
  • Thank you Tareq, I will check this link.
    Thursday, June 30, 2011 3:44 PM
  •  

    Hi Jon, 

    I would also strongly recommend you take a look at the C# SkeletonViewer sample code - as it does exactly what you are trying to do!  It assigns a grayscale color based on the depth value and displays the full image depth view in real time on the application window.  You could probably hijack what you need from the sample code for your own purposes. 

    You can find the sample application under: C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI

     


    Susan
    Thursday, June 30, 2011 6:09 PM
  • Thanks, those were what I needed. Eddy has marked the messages as answer yet.

    Friday, July 1, 2011 8:00 AM