Kinect Minilogs: Building a Kinect 4 Windows 8 App part 2

Let the confusion begin…

As I start down the path of building my Kinect for Windows (K4W) Windows 8 Application, confusion starts to set in about why I can’t just create a .Net Framework based application in the programming languages of C# or Visual Basic.Net. After all, the last 11 years of Microsoft based computer programming has been rooted in the .Net Framework. We started with the .Net Framework 1.0, and today in the year 2013 we are now in the .Net Framework 4.5. The K4W SDK, and toolkit provide a very simple .Net Framework assembly: Microsoft.Kinect.dll. This assembly is a .Net Framework based assembly, which means as a developer you can quickly and easily build .Net Framework based applications to use the device’s capabilities. The interesting part about this is that this is the only assembly and dll Microsoft provides for interacting with the K4W device.

Question: You mean you can’t write a Kinect 4 Windows 8 application with the .Net Framework?

Well, yes and no. Windows 8 comes in multiple flavors. We have Windows 8 Pro, Windows 8 RT, and Windows 8 Embedded. Windows 8 Pro is the full edition that allows developers to create 2 different type of applications “Desktop” and “Windows Store”. As of right now, these application types are not interchangeable, meaning you can’t develop a “Desktop” which switches to a “Windows Store” type application. You could develop two applications that function alike, thereby giving the impression that the “Windows Store” app is essentially the same as the “Desktop” version, but this is easier said than done. “Windows Store” applications are a new paradigm in programming. The Design model is completely different, as well as the application programming interfaces (Api’s) and libraries used to implement it.

The “Desktop” type of application allows for backwards compatibility to older versions of Windows. This was your typical application that can run in Windows 7, Vista, and before. The “Desktop” type of application supports the full .Net Framework, version 2.0 all the way up to version 4.5. The K4W assembly was written with the .Net Framework 2.0 base, and refreshed to work with the .Net Framework 4.5. As a developer you can take full advantage of this assembly inside your applications.

On the other hand, “Windows Store” applications are based on the new execution engine called the “Windows Runtime” or WinRT for short. The WinRT engine uses a new programming library and set of API’s which include a subset of the .Net Framework. Basically it is the .Net Framework for WinRT. This is not the full fledge .Net Framework 4.5 we developers have become accustom to. The K4W .Net Assembly has not been tested, nor has it been given the official “stamp” of “support” for this framework. There is no guarantee that this assembly will work with this new .Net Framework for WinRT. So, as a developer, if you want a K4W device to work correctly in the official supported way with a “Windows Store” application you have 2 choices.

  1. Wait for Microsoft to release a new Microsoft.Kinect.Dll for WinRT…
  2. Or, create a wrapper library yourself, following the new design and guidelines for the WinRT engine.

One would figure that Microsoft will eventually do this, however Windows 8 is out now, and it could be another 6 months to a year before we see or hear anything about choice #1. Thus, the answer to the above question is yes and no, it depends on the OS you are targeting as a developer.

Continuing on with the other flavors of Windows 8, we have Windows 8 RT. Windows 8 RT only supports “Windows Store” applications, and it must be compiled for the ARM processor chip. This effectively means that the only set of developer API’s available to you are the WinRT api’s and the .Net Framework for WinRT.

Windows 8 Embedded supports both Desktop and Windows Store applications, however it depends upon the configuration of which core Windows OS components are enabled. Windows 8 Embedded allows you to remove or disable core components, such as the Desktop application support, and Windows Store application support and a wide host of other things, like keyboard support, network, printing and etc. Windows 8 Embedded also allows you to control which processor chip you want to support: ARM, Intel, x86, x64, and others. Windows 8 Embedded is the only Windows 8 based OS flavor that allows you to create a “Kiosk” on a touch screen device and completely “harden” it or lock it down.

Question: So you mean to tell me you’re going to write a wrapper around the Microsoft.Kinect.Dll Assembly?

It appears so… I’ve already started down this path. I have the Kinect Sensor Count, and Kinect Audio capabilities working, the rest is to follow. In part 3 I will discuss what it takes to build a wrapper for the WinRT engine. Maybe I will get lucky and the library will compile for ARM as well, this way the wrapper can support all the flavors of Windows 8.

Kinect Minilogs: Building a Kinect 4 Windows 8 App part 1

Greetings all,

It has been a while since I wrote about the Kinect for Windows (K4W). The reason is because I’ve been busy learning all about the Kinect, and thanks to the Kinect for windows team at Microsoft, I’ve also been learning about the upcoming changes and additions to the K4W toolkit, SDK, and device.

Let me say this without saying much… It’s an exciting time to be a device developer, especially a Kinect Device developer.

With the recent rumor about the Kinect 2.0 device, and soon to be released Kinect Fusion
(1), developing applications for the Kinect Device and K4W couldn’t be more fun and entertaining!

While I can’t specifically speak about any other upcoming changes and additions let me just say again… It’s an exciting time to be a device developer, especially a Kinect for Windows device developer.

As some of you already know, Microsoft recently release it’s flagship OS and products line: Windows 8, Windows 8 Surface RT and Windows 8 Surface Pro devices. This OS and these devices once again are making a splash into IT industry. I won’t argue the goods and bads, being you all know I’m a Linux Gentoo Geek since 2009. I will say that both the OS and line of devices have changed the way developers develop and design applications. Simply put, it is another game changer, much like the Apple IPods, IPhones, and IPads, not as major, but still a changer none the less. It is not as much a game changer like the Xbox Kinect device but again a changer none the less.

Understanding the development changes, and design changes of Windows 8 and its devices will require a learning curve which I too am not excused of its effects. Thus the purpose of this posting is to talk about my experiences when developing an application for the Kinect 4 Windows device on a Windows 8 OS and its many devices.

First off right out of the box, there are many things to think about when designing and developing a K4W application for Windows 8. There are too many things to discuss in this one post alone, however I will briefly bring them up in a bullet points. As I develop applications, I will go back through these bullets and most likely talk about my experiences with them in many posts during the year.

Design Challenges:

  • Windows 8 devices are Touch Devices
  • K4W is a Touchless Device
  • Windows 8 has areas outside of the pixel for user interactions
    • Such as Swiping from Top to bottom
    • Swiping from Left to right
    • Swiping from Right to left
  • K4W has no pixel representations of “Area”, it’s area is the whole space surrounding the user (within the device limits of course)

Development Challenges:

  • Windows 8 RT devices can only install applications from a Windows Store
    • Currently no driver exists for K4W device and its many sensors
    • There are currently no Windows Store applications which contain the K4W device and drivers
    • There are currently no Windows Store applications that are compatible with K4W
  • Windows 8 Pro devices do support the K4W device and drivers however depending on the GPU of the Pro device, it may not be powerful enough to support Kinect Fusion
  • Windows 8 requires the WinRT libraries for development
    • VS.Net 2012 is the only development tool for WinRT which by default doesn’t support K4W
  • K4W can be developed with C#, VB.Net, C++, DirectX, and XNA
    • No library exists right now to work with WinRT

These challenges are just a few as more will probably be added to this post as I develop my Kinect for Windows 8 application.

In part 2 of this post, I will talk about the steps I have used thus far to get the bare minimal framework working for K4W based applications.