Monday, November 18, 2013

Kinect for Windows v2 dev kit unboxing (video)

I just received my Kinect for Windows (K4W) v2 dev kit and opened it for the first time on camera:

This is the alpha version of the hardware that is being sent to K4W developer program members sometime very soon. The final version may differ, and the power supply situation will definitely be smaller.

The K4W team gave the K4W MVPs their v2 dev kits today, November 17th, during the MVP Summit. (Microsoft MVP = Most Valuable Professional, which is an award for people to contribute to various technical communities.) The team is also generously allowing developer program members to share and demo the pre-release sensor hardware and applications publicly without any NDA restrictions.

I'll follow up with another video in a few days after I am back home and have set up the new sensor with my computer.

Note: In the video, I said that the model number for non-USA dev kits would end in 2. There may also be a 3 version. The difference is only which power supply is included. Don't plug in the dev kit to power in the wrong country!

Tuesday, August 27, 2013

Cross-post: Joshua Blake on Kinect and the Natural User Interface Revolution (part 3)

The post below is cross-posted from the Kinect for Windows Developer blog. The introduction is written by Ben Lower of the Kinect for Windows team and the body is written by me (Josh).

The following blog post was guest authored by Kinect for Windows (K4W) MVP, Joshua Blake. Josh is the Technical Director of the InfoStrat Advanced Technology Group in Washington, D.C. where he and his team work on cutting-edge Kinect and NUI projects for their clients. You can find him on twitter @joshblake or at his blog,
Josh recently recorded several videos for our Kinect for Windows Developer Center. This is the third of three posts he will be contributing this month to the blog.

In part 1, I shared videos covering the core natural user interface concepts and a sample application that I use to control presentations called Kinect PowerPoint Control. In part 2, I shared two more advanced sample applications: Kinect Weather Map and Face Fusion. In this post, I’m going to share videos that show some of the real-life applications that my team and I created for one of our clients. I’ll also provide some additional detail about how and why we created a custom object tracking interaction. These applications put my NUI concepts into action and show what is possible with Kinect for Windows. 

Making it fun to learn

Our client, Kaplan Early Learning Company, sells teaching resources focused on early childhood education. Kaplan approached us with an interest in creating a series of educational applications for preschool and kindergarten-aged children designed to teach one of several core skills such as basic patterns, spelling simple words, shapes, and spatial relationships. While talking to Kaplan, we learned they had a goal of improving student engagement and excitement while making core skills fun to learn.
We suggested using Kinect for Windows because it would allow the students to not just interact with the activity but also be immersed in virtual worlds and use their bodies and physical objects for interacting. Kaplan loved the idea and we began creating the applications. After a few iterations of design and development, testing with real students, and feedback, we shipped the final builds of four applications to Kaplan earlier this summer. Kaplan is now selling these applications bundled with a Kinect for Windows sensor in their catalog as Kaplan Move-NG.
The Kinect for Windows team and I created the videos embedded below to discuss our approach to addressing challenges involved in designing these applications and to demonstrate the core parts of three of the Move-NG applications.

Designing early childhood education apps for Kaplan

In the video below, I discuss InfoStrat’s guiding principles to creating great applications for Kinect as well as some of the specific challenges we faced creating applications that are fun and exciting for young children while being educational and fitting in a classroom environment. In the next section below the video, read on for additional discussion and three more videos showing the actual applications.

One of the key points covered in this video is that when designing a NUI application, we have to consider the context in which the application will be used. In the education space, especially in early childhood education, this context often includes both teachers and students, so we have to design the applications with both types of users in mind. Here are a few of the questions we thought about while designing these apps for Kaplan:
  • When will the teacher use the app and when will the students use the app?
  • Will the teacher be more comfortable using the mouse or the Kinect for specific tasks? Which input device is most appropriate for each task?
  • Will non-technical teachers understand how to set up the space and use the application? Does there need to be a special setup screen to help the teacher configure the classroom space?
  • How will the teachers and students interact while the application is running?
  • How long would it take to give every student a turn in a typical size classroom?
  • What is the social context in the classroom, and what unwritten social behavior rules can we take into account to simplify the application design?
  • Will the user interaction work with both adults and the youngest children?
  • Will the user interaction work across the various ways children respond to visual cues and voice prompts?
  • Is the application fun?
  • Do students across the entire target age group understand what to do with minimal or no additional prompts from the teacher?
And most importantly:
  • Does the design satisfy the educational goals set for the application? 

As you can imagine, finding a solution to all of these questions was quite a challenge. We took an iterative approach and tested with real children in the target age range as often as possible. Fortunately, my three daughters are in the target age range so I could do quick tests at home almost daily and get feedback. We also sent early builds to Kaplan to get a broader range of feedback from their educators and additional children.
In several cases, we created a prototype of a design or interaction that worked well for ourselves as adults, but failed completely when tested with children. Sometimes the problem was the data from the children’s smaller bodies had more noise. Other times the problem was that the children just didn’t understand what they were supposed to do, even with prompting, guidance, or demonstration. It was particularly challenging when a concept worked with older kindergarten kids but was too complex for the youngest of the preschooler age range. In those cases there was a cognitive development milestone in the age range that the design relied upon and we simply had to find another solution. I will share an example of this near the end of this post.

Kaplan Move-NG application and behind-the scenes videos

The next three videos each cover one of the Kaplan Move-NG applications. The videos introduce the educational goal of the app and show a demonstration of the core interaction. In addition, I discuss the design challenges mentioned above as well as implementation details such as what parts of the Kinect for Windows SDK we used, how we created a particular interaction, or how feedback from student testing affected the application design. These videos should give you a quick overview of the apps as well as a behind-the-scenes view into what went into the designs.  I hope sharing our experience will help you create better applications which incorporate the interactivity and fun of Kinect.

Object tracking as a natural interaction

The last video above showed Word Pop, which has the unique feature of letting the user spell words by catching letters with a physical basket (or box). In the video, I showed how we created a custom basket tracker by transforming the Kinect depth data. (My technique was inspired by Kyle McDonald’s work at the Art && Code 2011 conference, as shown at 1:43 in his festival demonstration.) Figure 1 shows the basket tracker developer UI as shown in the Word Pop video. In this section, I’m going to give a little more detail on how this basket tracker works and what led to this design.
Figure 1: The basket tracker developer UI used internally during development of Word Pop. The left image in the interface shows the background removed user and basket, with a rectangle drawn around the basket. The right image shows a visualization of how the application is transforming the depth data.
To find the basket, we excluded the background and user’s torso from the depth image and then applied the Sobel operator. This produces a gradient value representing the curvature at each point. We mark pixels with low curvature as flat pixels, shown in white in figure 1. The curvature threshold value for determining flat pixels was found empirically.
The outline of the basket is determined by using histograms of flat pixels across the horizontal and vertical dimensions, shown along the top and left edges of the right image in figure 1. The largest continuous area of flat pixels in each dimension is assumed to be the basket. The basket area is expanded slightly, smoothed across frames, and then the application hit tests this area against the letters falling from the sky to determine when the student has caught a letter.
In testing, we found this implementation to be robust even when the user moves the basket around quickly or holds it out at the end of one arm. In particular, we did not need to depend upon skeleton tracking, which was often interrupted by the basket itself.
One of our early Word Pop prototypes used hand-based interaction with skeleton tracking, but this was challenging for the youngest children in the target age range to use or understand. For example, given a prompt of “touch the letter M”, my three-year-old would always run to the computer screen to touch the “M” physically rather than moving her mirror image avatar to touch it. On the other hand, my seven-year-old used the avatar without a problem, illustrating the cognitive development milestone challenge I mentioned earlier. When we added the basket, skeleton tracking data became worse, but we could easily track the interactions of even the youngest children. Since “catching” with the basket has only one physical interpretation – using the avatar image – the younger kids started interacting without trouble.
The basket in Word Pop was a very simple and natural interaction that the children immediately understood. This may seem like a basic point, but it is a perfect example of what makes Kinect unique and important: Kinect lets the computer see and understand our real world, instead of us having to learn and understand the computer. In this case, the Kinect let the children reuse a skill they already had – catching things in baskets – and focus on the fun and educational aspects of the application, rather than being distracted by learning a complex interface.
I hope you enjoyed a look behind-the-scenes of our design process and seeing how we approached the challenge of designing fun and educational Kinect applications for young children. Thanks to Ben Lower for giving me the opportunity to record the videos in this post and the previous installments. Please feel free to comment or contact me if you have any questions or feedback on anything in this series. (Don’t forget to check out part 1 and part 2 if you haven’t seen those posts and videos already.)
Thanks for reading (and watching)!
@joshblake | | mobile +1 (703) 946-7176 |

Monday, August 19, 2013

Cross-post: Joshua Blake on Kinect and the Natural User Interface Revolution (Part 2)

The post below is cross-posted from the Kinect for Windows Developer blog. The introduction is written by Ben Lower of the Kinect for Windows team and the body is written by me (Josh).

 The following blog post was guest authored by K4W MVP, Joshua Blake. Josh is the Technical Director of the InfoStrat Advanced Technology Group in Washington, D.C where he and his team work on cutting-edge Kinect and NUI projects for their clients. You can find him on twitter @joshblake or at his blog,
Josh recently recorded several videos for our Kinect for Windows Developer Center. This is the second of three posts he will be contributing this month to the blog.

part 1, I shared videos covering the core natural user interface concepts and a sample application that I use to control presentations called Kinect PowerPoint Control. In this post, I’m going to share videos of two more of my sample applications, one of which is brand new and has never been seen before publicly!
When I present at conferences or workshops about Kinect, I usually demonstrate several sample applications that I’ve developed. These demos enable me to illustrate how various NUI design scenarios and challenges are addressed by features of the Kinect. This helps the audience see the Kinect in action and gets them thinking about the important design concepts used in NUI. (See the Introduction to Natural User Interfaces and Kinect video in part 1 for more on NUI design concepts.)
Below, you will find overviews and videos of two of my open source sample applications: Kinect Weather Map and Face Fusion. I use Kinect Weather Map in most developer presentations and will be using the new Face Fusion application for future presentations.
I must point out that these are still samples - they are perhaps 80% solutions to the problems they approach and lack the polish (and complexity!) of a production system. This means they still have rough edges at certain places but also are easier for a developer to look through and learn from the code.
Kinect Weather Map
This application lets you play the role of a broadcast meteorologist and puts your image in front of a live, animated weather map. Unlike a broadcast meteorologist, you won’t need a green screen or any special background due to the magic of the Kinect! The application demonstrates background removal, custom gesture recognition, and a gesture design that is appropriate to this particular scenario. This project source code is available under an open source license at
Here are three videos covering different aspects of the Kinect Weather Map sample application:

I made Kinect Weather Map a while ago, but it still works great for presentations and is a good reference for new developers for getting started with real-time image manipulation and background removal. This next application, though, is brand new and I have not shown it publicly until today!

Face Fusion
The Kinect for Windows SDK recently added the much-awaited Kinect Fusion feature. Kinect Fusion lets you integrate data across multiple frames to create a 3D model, which can be exported to a 3D editing program or used in a 3D printer. As a side-effect, Kinect Fusion also tracks the position of the Kinect relative to the reconstruction volume, the 3D box in the real-world that is being scanned.
I wanted to try out Kinect Fusion so I was thinking about what might make an interesting application. Most of the Kinect Fusion demos so far have been variations of scanning a room or small area by moving the Kinect around with your hands. Some demos scanned a person, but required a second person to move the Kinect around. This made me think – what would it take to scan yourself without needing a second person? Voila! Face Fusion is born.
Face Fusion lets you make a 3D scan of your own head using a fixed Kinect sensor. You don’t need anyone else to help you and you don’t need to move the Kinect at all. All you need to do is turn your head while in view of the sensor. This project source code is available under an open source license at
Here are two videos walking through Face Fusion’s design and important parts of the source code. Watch them first to see what the application does, then join me again below for a more detailed discussion of a few technical and user experience design challenges.

I’m pretty satisfied with how Face Fusion ended up in terms of the ease of use and discoverability. In fact, at one point while setting up to record these videos, I took a break but left the application running. While I wasn’t looking, the camera operator snuck over and started using the application himself and successfully scanned his own head. He wasn’t a Kinect developer and didn’t have any training except watching me practice once or twice. This made me happy for two reasons: it was easy to learn, and it worked for someone besides myself!
Face Fusion Challenges
Making the application work well and be easy to use and learn isn’t as easy as it sounds though. In this section I’m going to share a few of the challenges I came across and how I solved them.
Figure 1: Cropped screenshots from Face Fusion: Left, the depth image showing a user and background, with the head and neck joints highlighted with circles. Right, the Kinect Fusion residual image illustrates which pixels from this depth frame were used in Kinect Fusion.

Scanning just the head
Kinect Fusion tracks the movement of the sensor (or the movement of the reconstruction volume – it is all relative!) by matching up the new data to previously scanned data. The position of the sensor relative to the reconstruction volume is critical because that is how it knows where to add the new depth data in the scan. Redundant data from non-moving objects just reinforces the scan and improves the quality. On the other hand, anything that changes or moves during the scan is slowly dissolved and re-scanned in the new position.
This is great for scanning an entire room when everything is fixed, but doesn’t work if you scan your body and turn your head. Kinect Fusion tends to lock onto your shoulders and torso, or anything else visible around you, while your head just dissolves away and you don’t get fully scanned. The solution here was to reduce the size of the reconstruction volume from “entire room” to “just enough to fit your head” and then center the reconstruction volume on your head using Kinect SDK skeleton tracking.
Kinect Fusion ignores everything outside of the real-world reconstruction volume, even if it is visible in the depth image. This causes Kinect Fusion to only track the relative motion between your head and the sensor. The sensor can now be left in one location and the user can move more freely and naturally because the shoulders and torso are not in the volume.
Figure 2: A cropped screenshot of Face Fusion scanning only the user’s head in real-time. The Face Fusion application uses Kinect Fusion to render the reconstruction volume. Colors represent different surface normal directions.
Controlling the application
Since the scanning process requires the user to stand (or sit) in view of the sensor rather than at the computer, it is difficult to use mouse or touch to control the scan. This is a perfect scenario for voice control! The user can say “Fusion Start”, “Fusion Pause”, or “Fusion Reset” to control the scan process without needing to look at the screen or be near the computer. (Starting the scan just starts streaming data to Kinect Fusion, while resetting the scan clears the data and resets the reconstruction volume.)
Voice control was a huge help, but I found that when testing the application, I still tended to try to watch the screen during the scan to see how the scan was doing and if the scan had lost tracking. This affected my ability to turn my head far enough for a good scan. If I ignored the screen and slowly turned all the way around, I would often find the scan had failed early on because I moved too quickly and I wasted all that time for nothing. I realized that in this interaction, we needed to have both control of the scan through voice and feedback on the scan progress and quality through non-visual means. Both channels in the interaction are critical.
Figure 3: A cropped Face Fusion screenshot showing the application affirming that it heard the user’s command, top left. In the top right, the KinectSensorChooserUI control shows the microphone icon so the user knows the application is listening.
Providing feedback to the user
Since I already had voice recognition, one approach might have been to use speech synthesis to let the computer guide the user through the scan. I quickly realized this would be difficult to implement and would be a sub-optimal solution. Speech is discrete but the scan progress is continuous. Mapping the scan progress to speech would be challenging.
At some point I got the idea of making the computer sing, instead. Maybe the pitch or tonality could provide a continuous audio communication channel. I tried making a sine wave generator using the NAudio open source project and bending the pitch based upon the average error in the Kinect Fusion residual image. After testing a prototype, I figured out that this worked well; it greatly improved my confidence in the scan progress without seeing the screen. Even better, it gave me more feedback than I had before so I knew when to move or hold still, resulting in better scan results!
Face Fusion plays a pleasant triad chord when it has fully integrated the current view of the user's head, and otherwise continuously slides a single note up to an octave downward based upon the average residual error. This continuous feedback lets me decide how far to turn my head and when I should stop to let it catch up. This is easier to understand when you hear it.  I encourage you to watch the Face Fusion videos above.  Better yet download the code and try it yourself!
The end result may be a little silly to listen to at first, but if you try it out you’ll find that you are having an interesting non-verbal conversation with the application through the Kinect sensor – you moving your head in specific ways and it responding with sound. It helps you get the job done without needing a second person.
This continuous audio feedback technique would also be useful for other Kinect Fusion applications where you move the sensor with your hands. It would let you focus on the object being scanned rather than looking away at a display.
Figure 4: A sequence of three cropped Face Fusion screenshots showing the complete scan. When the user pauses the scan by saying “Kinect Pause”, Face Fusion rotates the scan rendering for user review.
Keep watching this blog this next week for part three, where I will share one more group of videos that break down the designs of several early-childhood educational applications we created for our client, Kaplan Early Learning Company. Those videos will take you behind-the-scenes on our design process and show you how we approached the various challenging aspects of designing fun and educational Kinect applications for small children.
@joshblake | | mobile +1 (703) 946-7176 |

Monday, August 12, 2013

Cross-post: Joshua Blake on Kinect and the Natural User Interface Revolution (Part 1)

The post below is cross-posted from the Kinect for Windows Developer blog. The introduction is written by Ben Lower of the Kinect for Windows team and the body is written by me (Josh).

The following blog post was guest authored by K4W MVP, Joshua Blake. Josh is the Technical Director of the InfoStrat Advanced Technology Group in Washington, D.C where he and his team work on cutting-edge Kinect and NUI projects for their clients. You can find him on twitter @joshblake or at his blog,
Josh recently recorded several videos for our Kinect for Windows Developer Center and will be contributing three posts this month to the blog.

I've been doing full-time natural user interface (NUI) design and development since 2008:  starting with multi-touch apps for the original Microsoft Surface (now called “PixelSense") and most-recently creating touch-free apps using Kinect. Over this time, I have learned a great deal about what it takes to create great natural user interfaces, regardless of the input or output device.
One of the easiest ways to get involved with natural user interfaces is by learning to create applications for the Kinect for Windows sensor, which has an important role to play in the NUI revolution. It is inexpensive enough to be affordable to almost any developer, yet it allows our computers see, hear, and understand the real-world similar to how we understand it. It isn't enough to just mash up new sensors with existing software, though. In order to reach the true potential of the Kinect, we need learn what makes a user interface truly ‘natural’.

The Kinect for Windows team generously offered to record several videos of me sharing my thoughts on natural user interface and Kinect design and development. Today, you can watch the first three of these videos on the Kinect for Windows Developer Center.
Introduction to Natural User Interfaces and Kinect
In this video, I present the most important ideas and concepts that every natural user interface designer or developer must know and give concrete examples of the ideas from Kinect development. This video covers: what natural user interfaces are, what ideas to consider when designing a natural user interface, and the difference between gestures and manipulations.

Kinect PowerPoint Control
This pair of videos covers my Kinect PowerPoint Control sample project. The “Design” video quickly demonstrates the features of the application, and the “Code Walkthrough” video explains the most important parts of the code. The project source code is available under an open source license at
I use this app all the time to control my PowerPoint presentations (such as the Intro to NUI video above) with Kinect. The app demonstrates the bare minimum code required to do simple custom gesture recognition using Kinect skeleton data and how to respond to basic voice commands using Kinect speech recognition. I have found many Kinect developers have trouble getting started with gesture recognition, so the features in the sample are kept minimal on purpose so that the code is easy to read and learn from.

Keep watching this blog next week for part two, where I will share more videos showing advanced features of the Kinect SDK.  I will introduce two more of my sample Kinect projects including a completely new, previously unpublished sample that uses Kinect Fusion for object scanning.
@joshblake | | mobile +1 (703) 946-7176 |

Saturday, March 16, 2013

Kinect for Windows SDK v1.7 coming March 18

It's been a while, dear blog readers.

I wanted to jump in and let you guys know that the Kinect for Windows SDK v1.7 is about to come out. It will be available for download on Monday, March 18th from

I have been using Kinect since the beginning, having started the OpenKinect community which created the first hacked Kinect drivers for PC, but today prefer developing using the Kinect for Windows SDK. I use the Kinect for Windows SDK for both work and personal projects and it has come a long way since the first release. Version 1.7 will be their fourth release in 14 months, and each release has promised something new. It already had the best API design for developing Kinect applications, but this new release adds several new important features that puts it over the top.

There are two major features new in Kinect for Windows SDK 1.7:

  • Kinect Interactions - an API and set of controls with a really mature design for general purpose hand tracking Kinect interactions. No longer do we each have to re-invent the wheel for Kinect hand interactions! Kinect Interactions are more advanced than the hand tracking used with Xbox 360 - the Kinect for Windows SDK can now accurately track and respond to both grip and push interactions! This makes it super easy to make hand tracking interactions, and will help lead to some consistently among applications.
  • Kinect Fusion - Finally, we now have access to the 3D scanning technology known as Kinect Fusion. This is the technology first developed and demoed by Microsoft Research in 2011. Kinect Fusion in 1.7 lets you use a Kinect for Windows sensor to scan and export high resolution static 3D models. As a side effect, this also allows applications to track the movement of the sensor with 6 degree-of-freedom, which is particularly useful if the sensor is hand held.
I recently spent some time visiting with the Kinect for Windows team in Redmond during the Microsoft MVP summit. They gave us a preview of these features, and while I cannot talk about certain details, I know that they have spent a significant amount of time perfecting Kinect Interactions and Kinect Fusion. In particular, the hand cursor designs and tuning have taken thousands of hours of testing and refinement, and the hand grip recognizer is extremely robust only because they invested many months and many people into perfecting it. 

For more information, read the official Kinect for Windows blog announcing the release.