Book Image

Kinect in Motion - Audio and Visual Tracking by Example

Book Image

Kinect in Motion - Audio and Visual Tracking by Example

Overview of this book

Kinect is a motion-sensing input device by Microsoft for the Xbox 360 video game console and Windows PCs. It provides capabilities to enhance human-machine interaction along with a zero-to-hero journey to engage the user in a multimodal interface dialog with your software solution. Kinect in Motion - Audio and Visual Tracking by Example guides you in developing more than five models you can use to capture gestures, movements, and voice spoken commands. The examples and the theory discussed provide you with the knowledge to let the user become a part of your application. Kinect in Motion - Audio and Visual Tracking by Example is a compact reference on how to master color, depth, skeleton, and audio data streams handled by Kinect for Windows.Starting with an introduction to Kinect and its characteristics, you will first be shown how to master the color data stream with no more than one page of lines of code. Learn how to manage the depth information and map them against the color ones. You will then learn how to define and manage gestures that enable the user to instruct the application simply by moving arms or any other type of natural action. Finally you will complete your journey through a multimodal interface, combining gestures with audio.The book will lead you through many detailed, real-world examples, and even guide you on how to test your application.
Table of Contents (12 chapters)

Preface

To build interesting, interactive, and user friendly software applications, developers are turning to Kinect for Windows to leverage multimodal and Natural User Interface (NUI) capabilities in their programs.

Kinect in Motion – Audio and Visual Tracking by Example is a compact reference on how to master color, depth, skeleton, and audio data streams handled by Kinect for Windows. You will learn how to use Kinect for Windows for capturing and managing color images tracking user motions, gestures, and their voice. This book, thanks to its focus on examples and to its simple approach, will guide you on how to easily step away from a mouse or keyboard driven application.

This will enable you to break through the modern application development space. The book will step you through many detailed, real-world examples, and even guide you on how to test your application.

What this book covers

Chapter 1, Kinect for Windows – Hardware and SDK Overview, introduces the Kinect, looking at the key architectural aspects such as the hardware composition and the software development kit components.

Chapter 2, Starting with Image Streams, shows you how to start building a Kinect project using Visual Studio and focuses on how to handle the color stream and the depth stream.

Chapter 3, Skeletal Tracking, explains how to track the skeletal data provided by the Kinect sensor and how to interpret them for designing relevant user actions.

Chapter 4, Speech Recognition, focuses on how to manage the Kinect sensor audio stream data and enhancing the Kinect sensor's capabilities for speech recognition.

Appendix, Kinect Studio and Audio Recording, introduces the Kinect Studio tool and shows you how to save and playback video and audio streams in order to simplify the coding and the test of our Kinect enabled application.

What you need for this book

The following hardware and software are required for the codes described in this book:

  • CPU: Dual-core x86 or x64 at 2,66 Ghz or faster

  • USB: 2.0 or compatible

  • RAM: 2 GB or more

  • Graphics card: DirectX 9.0c

  • Sensor: Kinect for Windows

  • Operating system: Windows 7 or Windows 8 (x86 and x64 version)

  • IDE: Microsoft Visual Studio 2012 Express or an other edition

  • Framework: .NET 4 or 4.5

  • Software Development Kit: Kinect for Windows SDK

  • Toolkit: Kinect for Windows Toolkit

The reader can also utilize a virtual machine (VM) environment from the following:

  • Microsoft HyperV

  • VMware

  • Parallels

Who this book is for

This book is great for developers new to the Kinect for Windows SDK and those who are looking to get a good grounding in mastering the video and audio tracking. It's assumed that you will have some experience in C# and XAML already. Whether you are planning to use Kinect for Windows in your LOB application or for more consumer oriented software, we would like you to have fun with Kinect and to enjoy embracing a multimodal interface in your solution.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text are shown as follows: " The X8R8G8B8 format is a 32-bit RGB pixel format, in which 8 bits are reserved for each color."

A block of code is set as follows:

<Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <!—- define additional RowDefinition entries as needed -->
</Grid.RowDefinitions>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public partial class MainWindow : Window
{   private KinectSensor sensor;
    public MainWindow()
    {   InitializeComponent();
        this.Loaded += MainWindow_Loaded;
        KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged;
    }

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Select the WPF Application Visual C# template".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to and mention the book title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output.

You can download this file from http://www.packtpub.com/sites/default/files/downloads/7187_Images.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material. We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.