User`s guide

Acquiring Image and Skeletal Data Using Kinect
12-9
Acquiring Image and Skeletal Data Using Kinect
In “Detecting the Kinect Devices” on page 12-7, you could see that the two sensors on the
Kinect for Windows are represented by two device IDs, one for the color sensor and one of
the depth sensor. In that example, Device 1 is the color sensor and Device 2 is the depth
sensor. This example shows how to create a videoinput object for the color sensor to
acquire RGB images and then for the depth sensor to acquire skeletal data.
1
Create the videoinput object for the color sensor. DeviceID 1 is used for the color
sensor.
vid = videoinput('kinect',1,'RGB_640x480');
2
Look at the device-specific properties on the source device, which is the color sensor
on the Kinect camera.
src = getselectedsource(vid);
src
Display Summary for Video Source Object:
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = ColorSource
Tag =
Type = videosource
Device Specific Properties:
Accelerometer = [0.0 -1.0 0.0]
AutoExposure = on
AutoWhiteBalance = on
BacklightCompensation = AverageBrightness
Brightness = 0.2156
CameraElevationAngle = 3
Contrast = 1
ExposureTime = 1.0
FrameInterval = 0
FrameRate = 30
Gain = 0
Gamma = 2.2
Hue = 0
PowerLineFrequency = Disabled