I'm currently trying to do hand / finger tracking using kinect in XNA. To do this, I need to specify the depth range that is required to render my program. I looked, and I do not understand how this is done. As far as I can tell, kinect depth values ββonly work with the predefined range found in Stream depth.
What I would like to do is make it modular so that I can change the range of depth that my kinect does. I know that this was before, but I cannot find anything on the Internet that can show me how to do this.
Can someone please help me?
I made it possible to display the standard depth view using kinect, and the method I made to convert the depth frame is as follows (I feel this is something here, I need to install)
private byte[] ConvertDepthFrame(short[] depthFrame, DepthImageStream depthStream, int depthFrame32Length) { int tooNearDepth = depthStream.TooNearDepth; int tooFarDepth = depthStream.TooFarDepth; int unknownDepth = depthStream.UnknownDepth; byte[] depthFrame32 = new byte[depthFrame32Length]; for (int i16 = 0, i32 = 0; i16 < depthFrame.Length && i32 < depthFrame32.Length; i16++, i32 += 4) { int player = depthFrame[i16] & DepthImageFrame.PlayerIndexBitmask; int realDepth = depthFrame[i16] >> DepthImageFrame.PlayerIndexBitmaskWidth;
I have a strong hunch that I need to change the values ββof int player and int realDepth, but I cannot be sure.
N0xus source share