While XNA is somewhat (?), well, you know... it still has a good following and I've not seen many examples of it with the Kinect for Windows v2, so when I saw Frank McCown's post I knew it was a must share...
Over the Thanksgiving break I managed to get my new Kinect for Windows 2 working with XNA. I couldn't find any code samples online using the new Kinect SDK, so hopefully this will help out others who are trying to do something similar.
This demo will show how to display the Kinect's video feed which is provided by its 1080p color camera. This is similar to the Color Basics-WPF C# Sample provided in the Kinect SDK 2 except that it is tailored for XNA.
You must have the Kinect for Windows 2 correctly installed along with the SDK. There are plenty of online tutorials showing you how to program with the older Kinect; this is for the latest version.
Microsoft is no longer maintaining XNA, but but you can still use it in Visual Studio 2013 as long as you install the following:
- Install Visual Studio 2010. Any edition will work.
- Install XNA Game Studio 4.0
- Install XNA 4.0 Refresh for VS 2013. After you have downloaded the zip file, extract it and run XNA Game Studio 4.0.vsix
If you do not have access to Visual Studio 2010, you might try MonoGame. Just be aware that it does not have a content pipeline converter (software that converts content like sound files into xnb files). I have not tried MonoGame with Kinect, but I don't see any reason why it wouldn't work.
Create an XNA Project
First create an XNA project by selecting File → Project... from the menu. Then select XNA Game Studio 4.0 template under Visual C# and select Windows Game (2.0). Name the project KinectVideoXna.
Project Information URL: http://frankmccown.blogspot.com/2014/11/kinect-for-windows-2-and-xna-demo.html
Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.