player segmentation in depthmaps stream

Sep 11, 2013 at 5:07 PM
Hi everyone,
I am using the kinect for a recording project, I manage to reacord all the streams (video, depth and skeleton), but I also would have liked to get the player segmentation.

For this latter, I am following the following explanation:
http://www.i-programmer.info/programming/hardware/2791-getting-started-with-microsoft-kinect-sdk-player-index.html

which seems to be correct regarding microsoft website:
http://msdn.microsoft.com/en-us/library/jj131028.aspx#PlayerIndex

Did anyone manage to do the player segmentation using the depth data in python?

Thank you for your attention,
Aymeric
Sep 11, 2013 at 5:44 PM
I just solved my problem, I find out that I needed to change the following line:
kinect.depth_stream.open(nui.ImageStreamType.Depth, 2, nui.ImageResolution.Resolution640x480, nui.ImageType.Depth)
into
kinect.depth_stream.open(nui.ImageStreamType.Depth, 2, nui.ImageResolution.Resolution640x480, nui.ImageType.DepthAndPlayerIndex)
Aymeric
Coordinator
Sep 11, 2013 at 6:03 PM
Glad you figured it out! And from there you should be able to extract the pixels in a similar way as in the linked article.