Is your Kinect connected?

Seems it's going to be a Abhijit Jana Theme week... Today's post is a quick tip from Abhijit Jana (you remember him from yesterday's post?, "Kinect Status Notifier") on checking if a Kinect device is connected (or not)

How to check if any Kinect device is connected with system ?

If you are dealing with Kinect based application, It is always good practice to first check if there is any Kinect sensor connected with the PC before doing any operation with KinectSensor objects. The KinectSensors holds the reference of all connected sensors and as this is a collection, it has a Count property.  You can use the KinectSensors.Count to check the number of device. The device count will more than 0, only if there is one or more device is connected.

image

Consider, you have one device connected, so you will get reference of connected sensor as shown in below code snippet.

...

Project Information URL: http://dailydotnettips.com/2013/08/07/how-to-check-if-any-kinect-device-is-connected-with-system/

Contact Information:

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.