User`s guide
Detecting the Kinect Devices
12-7
Detecting the Kinect Devices
Typically in the Image Acquisition Toolbox, each camera or image device has one
DeviceID. Because the Kinect for Windows camera has two separate sensors, the color
sensor and the depth sensor, the toolbox lists two DeviceIDs. If you use imaqhwinfo on
the adaptor, you can see this.
info = imaqhwinfo('kinect');
info
info =
AdaptorDllName: '<matlabroot>\toolbox\imaq\imaqadaptors\win64\mwkinectimaq.dll'
AdaptorDllVersion: '4.6 (R2013b)'
AdaptorName: 'kinect'
DeviceIDs: {[1] [2]}
DeviceInfo: [1x2 struct]
You can see the two device IDs in the output.
If you look at each device, you can see that they represent the color sensor and the depth
sensor. The following shows the color sensor.
info.DeviceInfo(1)
ans =
DefaultFormat: 'RGB_640x480'
DeviceFileSupported: 0
DeviceName: 'Kinect Color Sensor'
DeviceID: 1
VideoInputConstructor: 'videoinput('kinect', 1)'
VideoDeviceConstructor: 'imaq.VideoDevice('kinect', 1)'
SupportedFormats: {'RGB_1280x960' 'RGB_640x480' 'RawYUV_640x480' 'YUV_640x480'
'Infrared_640x480' 'RawBayer_1280x960' 'RawBayer_640x480'}
In the output, you can see that Device 1 is the color sensor.