Determining Kinect Capabilities at Runtime

So you've got a Kinect and all Kinect devices are the same, right? Nope. While the Kinect for Windows v2 and the Kinect for Xbox One are very close, much closer than the 360-vs-Windows v1, they are still a little different (the Windows v2 device doesn't have the IR Blaster).

Should you always just assume that a feature or capability is available? You know what they say about "assume"... Luckily Friend of the Gallery Abhijit Jana provides a nice tip on how you don't have to assume....

How to Identify the Kinect Sensor Capabilities ?

When you are developing a Kinect application, you must ensure that the Kinect device attached with your application supports all the required capabilities. If the attached device does not support the capabilities that your application need, you can prompt a message to user on the same. Now, how do we identify the capabilities of Kinect sensor?  Kinect for Windows SDK has a Properties KinectCapabilities that returns the capabilities of the attached Kinect Sensor.

Following code snippet shows how to get the default connected sensor and the capabilities that the sensor supports.

KinectSensor sensor = KinectSensor.GetDefault();
if (sensor != null)
{
KinectCapabilities sensorCapabilities = sensor.KinectCapabilities;
}


Run the above code and put a breakpoint to check the sensorCapabilities.

image

KinectCapabilities is a Flag enum defined in Microsoft.Kinect assembly and having following list of items.

...

Project Information URL: http://dailydotnettips.com/2015/02/09/how-to-identify-the-kinect-sensor-capabilities/

Many of our past posts from Abhijit;

Contact Information:




Tags:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
    Unsubscribing
    Subscribing

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.