0
votes

I have two Kinect V2, connected to two different USB 3.0 ports on a single PC. I know it is not possible to use both based on SDK V2 concurrently, and I know I should get access to the Kinect V2 using this method:

_sensor = KinectSensor.GetDefault();

However, it always returns back one of the sensors as default and it doesn't matter which USB 3.0 port I connect it.

First of all, is there any methods that we can get list of connected Kinect V2 connected to a single PC and turn on that one based on our preferences? I want to use one of in each time frame, but need to switch between them.

2

2 Answers

1
votes

There is a workaround, which is annoying, but seems to work:

You can enable/disable the USB-port/-controller each Kinect is connected to. Disable all ports but the one you need, and KinectSensor.GetDefault(); should give you the correct sensor.

You can do this manually in the device manager. But I'm sure there is also some way to do this automatically in code.

For more details see the thread Connection to multiple Kinect V2, NOT for synchronous acquisition on the Microsoft support forum.

-1
votes

It's possible to use both Kinects at the same time. I have developed an application that uses 2 Kinects, video and skeleton flows from both in the same time. It developed for sdk 1.8.

So, you can get all available ready devices like that:

KinectSensor.KinectSensors.Where(kinect => kinect.Status == KinectStatus.Connected)

Why do you need to switch between them? You may just activate the needed flow from both at one time. In the sdk it says that both Kinects can't work when they are directed to the same object. But it's working. If you want to switch between them like this:

  1. stop flow from first
  2. activate flow from second
  3. goto p.1

It's bad variant because p. 1 and 2 can take about a second time. It's a very slowly.