Color, depth and infrared streams in the Kinect for Windows v2 world (here's how)

Sign in to queue


This week we're doing another Kinect for Windows v2 week. From today's example, to tomorrow's cool project to finally the alpha version of a coming third party product.

But first, today we again highlight a post from Vangos Pterneas who shows us how easy it is to get and display the different Kinect for Windows v2 streams...

Kinect for Windows version 2: Color, depth and infrared streams


A month ago, I was happy to receive a brand-new Kinect for Windows version 2 Developer Preview sensor. You can read my previous blog post about the capabilities of the new device. Kinect v2 now includes 5 main types of input streams:

  • Color
  • Depth
  • Infrared
  • Body
  • Audio

Today I will show you how you can acquire and display each bitmap input in a Windows application. In the next blog post, we’ll talk about body tracking. Here is a quick video I made which demonstrates the different streams provided by the new sensor.


Creating a new project


Initializing the sensor

Let’s now dive into the C# code! ...

Reading the streams

That’s it! We have now connected to the sensor...

Color stream

The raw color images have been increased to 1920×1080 resolution...

Depth stream

The depth stream provides us with the depth value of every point in the visible area...

Infrared stream

The infrared sensor is the ability to view clearly into the dark...

That’s it! You can now display every bitmap stream! The only thing left to do is call the corresponding method and display the frame. This is how to display the color frame, for example:

Big hint: Kinect v2 requires you to start the KinectService.exe program before running any Kinect 2 apps. I always forget this detail, so I open this executable using a single line of C# code:

PS 1: Vitruvius

If you want to automate the above bitmap-conversion processes, consider downloading Vitruvius. Vitruvius is a free & open-source library I built, which provides many utilities for your Kinect applications, including gesture detection, voice recognition and drawing extensions. Give it a try, enjoy and even contribute yourself!

PS 2: New Kinect book – 20% off

Well, I am publishing a new ebook about Kinect development in a couple months. It is an in-depth guide about Kinect, using simple language and step-by-step examples. You’ll learn usability tips, performance tricks and best practices for implementing robust Kinect apps. Please meet Kinect Essentials, the essence of my 3 years of teaching, writing and developing for the Kinect platform. Oh, did I mention that you’ll get a 20% discount if you simply subscribe now? Hurry up

[Read the entire post]

Project Information URL:

Project Source URL:

Contact Information:

The Discussion

Add Your 2 Cents