O'Reilly logo

Kinect for Windows SDK Programming Guide by Abhijit Jana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling the color stream channel

The KinectSensor class has a property ColorStream of type ColorImageStream, which actually handles everything that is required for capturing the color image. The first thing it must do is get the reference of the connected sensor and start it.

this.sensor = KinectSensor.KinectSensors.FirstOrDefault( sensorItem => sensorItem.Status == KinectStatus.Connected);
this.StartSensor();

Here sensor is an object of the type KinectSensor class. Once you have the sensor object and reference of the Kinect sensor, you can enable the stream by calling the Enable() method of the ColorImageStream class, as follows:

this.sensor.ColorStream.Enable();

When the sensor is running and the color stream is enabled, it will initialize the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required