Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Kinect for Windows SDK Programming Guide
Kinect for Windows SDK Programming Guide

Kinect for Windows SDK Programming Guide:

eBook
€8.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Kinect for Windows SDK Programming Guide

Chapter 2. Getting Started

The Kinect for Windows SDK is a toolkit for developing applications for Kinect devices. Developing applications using Kinect SDK is fairly easy and straightforward. The SDK provides an interface to interact with Kinect via system drivers. The SDK includes drivers for the Kinect sensor, which interact with the device, and the OS and APIs interact with the device through program. Overall, the SDK provides an opportunity to the developers to build an application using either managed code (C# and VB.NET) or unmanaged code (C++) using Visual Studio 2010 or higher versions, running on Windows 7 or Windows 8.

Kinect for Windows Developer Toolkit is an additional installer that comes with a set of extended components, such as Face Tracking SDK, which helps to track human faces, and Kinect Studio to record and playback the depth and color stream data. The Developer Toolkit also contains samples and documentation to give you a quick hands-on reference.

While the application...

System requirements for the Kinect for Windows SDK


While developing applications for any device using an SDK, compatibility plays a pivotal role. It is really important that your development environment must fulfill the following set of requirements before starting to work with the Kinect for Windows SDK.

Tip

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.

Supported operating systems

The Kinect for Windows SDK, as its name suggests, runs only on the Windows operating system. The following are the supported operating systems for development:

  • Windows 7

  • Windows Embedded 7

  • Windows 8

Note

The Kinect for Windows sensor will also work on Windows operating systems running in a virtual machine such as Microsoft HyperV, VMWare, and Parallels.

System configuration

The...

Evaluation of the Kinect for Windows SDK


Though the Kinect for Xbox sensor has been in the market for quite some time, Kinect for Windows SDK is still fairly new in the developer paradigm, and it's evolving. The book is written on Kinect for Windows SDK v1.6. The Kinect for Windows SDK was first launched as a Beta 1 version in June 2011, and after a thunderous response from the developer community, the updated version of Kinect for Windows SDK Beta 2 version was launched in November 2011. Initially, both the SDK versions were a non-commercial release and were meant only for hobbyists. The first commercial version of Kinect for Windows SDK (v1.0) was launched in February 2012 along with a separate commercial hardware device. SDK v1.5 was released on May 2012 with bunches of new features, and the current version of Kinect for Windows SDK (v1.6) was launched in October 2012. The hardware hasn't changed since its first release. It was initially limited to only 12 countries across the globe....

Downloading the SDK and the Developer Toolkit


The Kinect SDK and the Developer Toolkit are available for free and can be downloaded from http://www.microsoft.com/en-us/kinectforwindows/.

The installer will automatically install the 64- or 32-bit version of SDK depending on your operating system. The Kinect for Windows Developer Toolkit is an additional installer that includes samples, tools, and other development extensions. The following diagram shows these components:

Note

The main reason behind keeping SDK and Developer Toolkit in two different installers is to update the Developer Toolkit independently from the SDK. This will help to keep the toolkit and samples updated and distributed to the community without changing or updating the actual SDK version. The version of Kinect for Windows SDK and that for the Kinect for Windows Developer Toolkit might not be the same.

Installing Kinect for Windows SDK


Before running the installation, make sure of the following:

  • You have uninstalled all the previous versions of Kinect for Windows SDK

  • The Kinect sensor is not plugged into the USB port on the computer

  • There are no Visual Studio instances currently running

Start the installer, which will display the start screen as End User License Agreement. You need to read and accept this agreement to proceed with the installation. The following screenshot shows the license agreement:

Accept the agreement by selecting the checkbox and clicking on the Install option, which will do the rest of the job automatically.

Note

Before the installation, your computer may pop out the User Access Control (UAC ) dialog, to get a confirmation from you that you are authorizing the installer to make changes in your computer.

Once the installation is over, you will be notified along with an option for installing the Developer Toolkit, as shown in the next screenshot:

Tip

Is it mandatory to uninstall...

Testing your device


Once the SDK installation is complete, you are ready to start the development. But let's start with a few bits of testing.

Testing Kinect sensors

The Developer Toolkit has a set of sample applications; you can choose any of them to test the device. To quickly check it out, you can run the Kinect Explorer application from the Developer Toolkit. The Kinect Explorer demonstrates the basic features of the Kinect for Windows SDK, which retrieves color, depth, and skeleton data and displays them on the UI. The next screenshot shows the UI reference of the application:

If you are also able to view a similar-looking output, where you can see the Kinect sensor returning the depth, color, and skeleton data, you can be sure that your device has been installed properly.

Testing the Kinect microphone array

You can use Kinect as a microphone. Navigate to the Sound section in Control Panel and select the Recording tab to see Kinect's Microphone Array. This is shown in the following screenshot...

Looking inside the Kinect SDK


The Kinect SDK provides both managed and unmanaged libraries. If you are developing an application using either C# or VB.NET, you can directly invoke the .NET Kinect Runtime APIs; and for C++ applications, you have to interact with the Native Kinect Runtime APIs. Both the types of APIs can talk to the Kinect drivers that are installed as a part of SDK installation.

Note

The unmanaged and managed libraries provide access to the same set of Kinect sensor features.

For managed code, the Kinect for Windows SDK provides Dynamic Link Library (DLL) as an assembly (Microsoft.Kinect.dll), which can be added to any application that wants to use the Kinect device. You can find this assembly in the SDK installation directory, as shown in the next screenshot:

The Kinect driver can control the camera, depth sensor, audio microphone array, and the motor. Data passes between the sensor and the application in the form of data streams of the following types:

  • Color data stream

  • Depth...

Features of the Kinect for Windows SDK


Well, as of now we have discussed the components of the Kinect SDK, system requirements, installation of SDK, and setting up of devices. Now it's time to have a quick look at the top-level features of Kinect for Windows SDK.

The Kinect SDK provides a library to directly interact with the camera sensors, the microphone array, and the motor. We can even extend an application for gesture recognition using our body motion, and also enable an application with the capability of speech recognition. The following is the list of operations that you can perform with Kinect SDK. We will be discussing each of them in subsequent chapters.

  • Capturing and processing the color image data stream

  • Processing the depth image data stream

  • Capturing the infrared stream

  • Tracking human skeleton and joint movements

  • Human gesture recognition

  • Capturing the audio stream

  • Enabling speech recognition

  • Adjusting the Kinect sensor angle

  • Getting data from the accelerometer

  • Controlling the infrared...

The Kinect for Windows Developer Toolkit


Kinect for Windows Developer Toolkit is an additional set of components that helps you to build sophisticated applications easily by providing access to more tools and APIs. This toolkit has a number of samples, documentation for SDK API libraries, the Kinect Studio tool (a tool that can help you record and play Kinect and data during debugging), as well as the Face Tracking SDK.

After the installation of Developer Toolkit, you will get a standalone executable within the toolkit that is installed in the directory. Run the application; it will display the screen as shown in the following screenshot. You can navigate through it for resources and samples.

The Face Tracking SDK

The Face Tracking SDK is a part of the Kinect for Windows Developer Toolkit. It contains a few sets of APIs that you can use to track a human face, by taking advantages of Kinect SDK APIs. The SDK detects and tracks the positions and orientations of faces, and it can also animate...

Making your development setup ready


While the device and driver setup look good, you need to ensure your development environment is ready as well.

The basic software you require for setting up the development environment are Visual Studio 2010 Express Edition or any higher edition along with .NET 4.0 Framework, which we have already discussed as a part of system requirement.

If you are already familiar with development using Visual Studio, the basic steps for implementing an application using a Kinect device should be straightforward. You simply have to perform the following operations:

  1. Launch a new instance of Visual Studio.

  2. Create a new project.

  3. Refer to the Microsoft.Kinect.dll file.

  4. Declare the appropriate namespaces for the added assembly.

  5. Start using the Kinect SDK API library.

We will be discussing the details about development in the next chapter.

The Coding4Fun Kinect Toolkit


The Coding4Fun Kinect Toolkit provides several necessary extension methods to make developing of application using the Kinect for Windows SDK faster and easier. You can download the Coding4Fun Kinect Toolkit from http://c4fkinect.codeplex.com/.

Note

The Coding4Fun Kinect Toolkit is also available as a NuGet package. You can install it using the NuGet Package Manager console within Visual Studio.

We will explore some of the extension methods and the installation procedure of Coding4Fun Kinect Toolkit in the upcoming chapters.

Summary


In this chapter we have covered the prerequisites of an SDK installation, that is, the hardware and software requirements for the installation. A brief step-by-step guide for the installation, loading of drivers, and for setting up the development environment is also discussed. We have seen a quick overview of the Kinect SDK features and also the new Kinect SDK Developer Toolkit. We have also seen how the SDK provides an opportunity to developers to build applications using different languages such as C#, VB.NET, or C++. The knowledge gained from this chapter will help you fully grasp the subjects discussed in the subsequent chapters.

In the next chapter you will get started with development with the Kinect for Windows SDK.

Left arrow icon Right arrow icon

Key benefits

  • Building application using Kinect for Windows SDK.
  • Covers the Kinect for Windows SDK v1.6
  • A practical step-by-step tutorial to make learning easy for a beginner.
  • A detailed discussion of all the APIs involved and the explanations of their usage in detail
  • Procedures for developing motion-sensing applications and also methods used to enable speech recognition

Description

Kinect has been a game-changer in the world of motion games and applications since its first release. It has been touted as a controller for Microsoft Xbox but is much more than that. The developer version of Kinect, Kinect for Windows SDK, provides developers with the tools to develop applications that run on Windows. You can use this to develop applications that make interaction with your computer hands-free. This book focuses on developing applications using the Kinect for Windows SDK. It is a complete end to end solution using different features of Kinect for Windows SDK with step by step guidance. The book will also help you develop motion sensitive and speech recognition enabled applications. You will also learn about building application using multiple Kinects.The book begins with explaining the different components of Kinect and then moves into to the setting up the device and getting thedevelopment environment ready. You will be surprised at how quickly the book takes you through the details of Kinect APIs. You will use NUI to use the Kinect for Natural Inputs like skeleton tracking, sensing, speech recognizing. You will capture different types of stream, and images, handle stream event, and capture frame. Kinect device contains a motorized tilt to control sensor angles, you will learn how to adjust it automatically. The last part of the book teaches you how to build application using multiple Kinects and discuss how Kinect can be used to integrate with other devices such as Windows Phone and microcontroller.

Who is this book for?

The purpose of this book is to explain how to develop applications using the Kinect for Windows SDK. If you are a beginner and looking to start developing applications using the Kinect for Windows SDK, and if you want to build motion-sensing,speech-recognizing applications with Kinect, this book is for you.This book uses C# and WPF (Windows Presentation Foundation) in the examples, so you need to know the basics of C# and WPF. You should be familiar with the Visual Studio IDE as well. You don't have to know anything about the Kinect for Windows SDK.

What you will learn

  • Understand the Kinect sensor in terms of a device, different components, and how they work.
  • Step by step installation guide of SDK, troubleshooting tips and development environment setup.
  • Reading the Kinect device information, monitoring and notifying the sensor status change.
  • Automatically adjust the sensor elevation angle
  • Understand different approaches of capturing data stream from Kinect sensor.
  • Learn the uses of color, depth and IR data and how to leverage them in your applications.
  • Use skeleton-tracking for interactive applications and leveraging the applications to gesture-enabled application
  • Understand usages of Microphone array and build speech-enabled applications with Speech API
  • Develop applications using Multiple Kinects
  • Understand how to design cross device application with Kinect

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 26, 2012
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781849692380
Vendor :
Microsoft
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Dec 26, 2012
Length: 392 pages
Edition : 1st
Language : English
ISBN-13 : 9781849692380
Vendor :
Microsoft
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 91.97
Augmented Reality with Kinect
€28.99
Kinect for Windows SDK Programming Guide
€37.99
Kinect in Motion - Audio and Visual Tracking by Example
€24.99
Total 91.97 Stars icon
Banner background image

Table of Contents

11 Chapters
Understanding the Kinect Device Chevron down icon Chevron up icon
Getting Started Chevron down icon Chevron up icon
Starting to Build Kinect Applications Chevron down icon Chevron up icon
Getting the Most out of Kinect Camera Chevron down icon Chevron up icon
The Depth Data – Making Things Happen Chevron down icon Chevron up icon
Human Skeleton Tracking Chevron down icon Chevron up icon
Using Kinect's Microphone Array Chevron down icon Chevron up icon
Speech Recognition Chevron down icon Chevron up icon
Building Gesture-controlled Applications Chevron down icon Chevron up icon
Developing Applications Using Multiple Kinects Chevron down icon Chevron up icon
Putting Things Together Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(16 Ratings)
5 star 62.5%
4 star 31.3%
3 star 6.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Online Shopper Feb 12, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Simplicity----------This book is targeted for amateur to expert programmers. So if you are a hobbyist or a student or a geek, this book is good for you. However it does assume that you know the basics C# and a bit of WPF; after all the book cant teach you .NET, isn't it? If I were a college kid or a grown up who wants to make magic in my garage, then I would buy this book.Vastness--------The best part I like about this book is that it talks about everything in Kinect for Windows SDK. Whatever the API supports as of today is detailed to a great extend.Real time applications----------------------When the book talks about the features of the SDK / Kinect, it also corresponds it to real time applications. The book also has some cool real time samples / ideas for building futuristic applications.Author's Knowledge------------------By far my experience, Abhijit is one of the best person you can find when it comes to Kinect. Abhijit is a good friend and a peer of mine. Needles to say that I have a lot of experience in making projects based on Kinect with him. It has been a great pleasure for me to be a reader of this book from being a reviewer. I am also sure that he will be ready to help you out with your questions about Kinect; just tweet to him.This is book is not for-----------------------If you are expecting to hack the device and use a open SDK to program, then this book isn't for you. This book is for those who are willing to make personal / commercial applications using Kinect for Windows SDK. Kinect being the center of attention from Medical advancements to interactive media to Sci-Fi projects, you being a enterprise or a person, this is a good start if you dream programming with machines.
Amazon Verified review Amazon
Alexander Pabel Jul 17, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Man lernt alles rund um die Kinect und wie man Anwendungen für sie entwickelt mit dem "Kinect for Windows SDK"
Amazon Verified review Amazon
Keith Harvey Mar 22, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you are really wanting to go beyond the simple examples posted on the web, and really understand and learn all aspects of Kinect development, then this book is for you! It was for me. The authors and publisher worked really hard to illustrate and structure the book well. It was a pleasure to read and I learned much more than I thought I would. One thing I really liked is that they taught me about the hardware of the Kinect, teaching me where each sensor was placed, how the tilt motor functioned and even showed pictures of its internals.Overall, I think this is a great book!
Amazon Verified review Amazon
Mr. S. Jackson Mar 25, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Since reading [...] I've take a much more proactive interest in Kinect programming.Abhijit Janan has taken a very look leading approach to drawing you in to how to use the Kinect SDK and get used to NUI style development.It builds up very nicely on all the features enabled with Kinect like Skeletons, Audio, Tracking, Guestures and so on getting you a full working app by the end of each chapter.highly recommend this book for anyone interested in delving into Kinect, much better than any current on-line training resources with practical samples.
Amazon Verified review Amazon
Alon Fliess Mar 22, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Since the release of Kinect for PC I had the opportunity to take part and be involved with several Kinect based projects. Starting developing with the Kinect SDK is something that most .NET and native C++ developers can handle very easily. Just download and install the SDK, hook a Kinect device (you can use the Xbox Kinect, however you will need a power cable and do remember that it is just for the development process and some features, like near mode, will not work), run the Kinect toolkit browser, see the sample, read the document and open the source code.The hard part is to learn to use the Kinect for PC SDK to develop a real word Natural User Interface (NUI) based applications. You will need to deal with developing tasks such as understanding postures and gestures, using voice commands with Windows Speech SDK, and handling multiple Kinect devices simultaneously.This new book from Abhijit Jana is exactly what you need to flatten the steep learning curve. I wish I had this book when I started dealing with Kinect for PC, myself.The book starts with the basic features of Kinect and your first Kinect applications. It takes you through all the features of the Kinect device, which are exposed by the SDK. You will learn how to deal with the color and depth Cameras, How to reactive Skeleton events and understand the tracking state of the players. Two chapters talk about Kinect audio, the first one tells you how to get audio stream from the Microphone array and the second chapter teaches you how to use the audio stream as a feed to Microsoft Speech API, to implement Voice Recognition.The last chapters are going deep. Here you will read about NUI with gestures, understand how to recognize Skeleton positions and how to interpret the player gesture. The last chapter shows how you can add Kinect to a distributed application using the Cloud and the Phone.Kinect is a revolutionary device and this book provides the information you need to start developing NUI application with it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.