Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

CHAPTER 3: Depth Image Processing > Depth and Player Indexing

Depth and Player Indexing

The SDK has a feature that analyzes depth image data and detects human or player shapes. It recognizes as many six players at a time. The SDK assigns a number to each tracked player. The number or player index is stored in the first three bits of the depth pixel data (Figure 3-10). As discussed in an earlier section of this chapter, each pixel is 16 bits. Bits 0 to 2 hold the player index value, and bits 3 to 15 hold the depth value. A bit mask of 7 (0000 0111) gets the player index from the depth value. For a detailed explanation of bit masks, refer to Appendix A. Fortunately, the Kinect SDK defines a pair of constants focused on the player index bits. They are DepthImageFrame.PlayerIndexBitmaskWidth and DepthImageFrame.PlayerIndexBitmask. The value of the former is 3 and the latter is 7. Your application should use these constants and not use the literal values as the values maychange in future versions of the SDK.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint