I’m currently working on skeleton tracking program and my environment
is wide area and I have to use more than 1 Kinect to cover the entire area.
However, I can’t NuiInitialize 2 kinects at the same time. Note that I use
Microsoft KinectSDK Beta2.
Could anyone help me out with this?
Also here is my C++ code.
int no_kinetics =0;
static INuiInstance* kinect_0=NULL;
static INuiInstance* kinect_1=NULL;
HRESULT hr, hr0, hr1, hr_init_0, hr_init_1;
hr = MSR_NUIGetDeviceCount(&no_kinetics);
hr_init_0 = MSR_NuiCreateInstanceByIndex(0, &kinect_0);
hr0 = kinect_0->NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON);
hr_init_1 = MSR_NuiCreateInstanceByIndex(1, &kinect_1);
hr1 = kinect_1->NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON);
and the error code was -2097086294
I’ve been having the same issues, only that I use C#. I get an error when trying to initialize both Kinects with depth+player_info or skeletal tracking.
The SDK samples that come with the official SDK never do such a thing. It seems that there is a kind of lock that avoids initializing two kinects so. What I still don’t now, is the reason for such a behavior.Try to initialize one with skeletal tracking and the other one with simple depth (no player info) and let me know if that doesn’t fail for you. Then, it would mean we’re closer to know if that’s a common/expected behavior.
EDIT: I’ve found this post on MSDN, the MS partner there, says “Note that there are limitations for the video API, such as that skeletal tracking and depth + player index streams will only work for the default device at index 0. These are described in the programming guide: http://bit.ly/KinectSDKProgrammingGuide“
See:
http://social.msdn.microsoft.com/Forums/en-US/kinectsdk/thread/3e72f577-b0a7-4621-9015-3d95eff3a857/