Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Kinect in Motion - Audio and Visual Tracking by Example
Kinect in Motion - Audio and Visual Tracking by Example

Kinect in Motion - Audio and Visual Tracking by Example: Start building for the Kinect today by capturing gestures, movements, and spoken voice commands

eBook
Can$29.99 Can$33.99
Paperback
Can$41.99
Subscription
Free Trial

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 in Motion - Audio and Visual Tracking by Example

Chapter 2. Starting with Image Streams

The aim of this chapter is to understand the steps for capturing data from the color stream, depth stream, and IR stream data. The key learning tools and steps for mastering all these streams are:

  • color camera: data stream, event driven and polling techniques to manage color frames, image editing, color image tuning, and color image formats

  • depth image: data stream, depth image ranges, and mapping between color image and depth image

All the examples we will develop in this book are built on Visual Studio 2010 or 2012. In this introduction, we want to include the key steps for getting started.

From Visual Studio, select File | New | Project. In the New Project window, do the following:

  1. Select the WPF Application Visual C# template.

  2. Select the .Net Framework 4.0 as the framework for the project (it works in .Net Framework 4.5 too).

  3. Assign a name to the project (in our example, we selected Chapter02)

  4. Choose a location for the project.

  5. Leave all the other settings...

Color stream


Let's start by focusing on the color stream data. We are going to develop an example of how to apply data manipulation to the captured color stream.

The complete code is included in the CODE_02/ColorStream example delivered together with this book.

In the MainWindows.xaml file defined in the Visual Studio project, let's design our User Interface (UI) elements. We will use those elements to display the data obtained from the color stream.

Within the <Grid> </Grid> tags we can add the following XAML code:

<Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <!—- define additional RowDefinition entries as needed -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <!—- define additional ColumnDefinition entries as needed -->
</Grid.ColumnDefinitions>
<Image Name="imgMain" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" />
<TextBlock Name="tbStatus" Grid.Row="3" Grid...

Depth stream


The process, and the relating code for getting our depth stream data displayed, is very similar to the one we detailed for the color stream data.

In this section, we will list and document the essential steps for working with the depth stream data. The example attached to this chapter will provide all the additional details.

In order to process the depth stream data obtained by the connected KinectSensor, sensor we need to enable the KinectSensor.DepthStream using the KinectSensor.DepthStream.Enable(ColorImageFormat colorImageFormat) API.

The KinectSensor.DepthFrameReady is the event that the sensor fires when a new frame from the depth stream data is ready. The Kinect sensor streams data out continuously, one frame at a time, till the sensor is stopped or the depth stream is disabled. To stop the sensor, you can use the KinectSensor.Stop() method, and to disable the depth stream, use the KinectSensor.DepthStream.Disable() method.

We can register to the KinectSensor.DepthFrameReady...

Summary


In this chapter we learned how to start building a Kinect project using Visual Studio, and we focused on how to handle color streams and depth streams.

We managed the KinectSensors_StatusChanged event handler to retrieve the potential active Kinect sensor and we learned how to start the sensor using the KinectSensors.Start() method.

Thanks to the KinectSensors.ColorStream.Enable(ColorImageFormat) and the event handler attached to the KinectSensors.ColorFrameReady, we started to manipulate the color stream data provided by the Kinect sensor. We then had some fun applying custom effects to the color stream data.

We went through scenarios where retrieving color frames using the KinectSensors.ColorFrameReady could cause issues, and we introduced the polling technique using the ColorImageFrame OpenNextFrame (int millisecondsWait) API instead.

We introduced the SDK V 1.6 new API ColorStream.CameraSettings for tuning the images provided by the Kinect sensor.

Using the ColorImageFrame.Format...

Left arrow icon Right arrow icon

Key benefits

  • Step-by-step examples on how to master the essential features of Kinect technology
  • Fully-functioning code samples ready to expand and adjust to your need
  • Compact and handy reference on how to adopt a multimodal user interface in your application

Description

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.

Who is this book for?

Kinect in Motion - Audio and Visual Tracking by Example is great for developers new to the Kinect for Windows SDK, and who are looking to get a good grounding in how to master video and audio tracking. It's assumed that you have some experience in C# and XAML already.

What you will learn

  • Tune the captured color data stream to adjust the output to the environmental condition
  • Detect simple actions, such as arm movement, to raise events in your application
  • Debug and test your application to increase the quality of the software delivered
  • Track users wherever they are seated or standing so that your application can interact with the users
  • Capture sounds to convert the vocal input into application commands
  • Adjust the Kinect angle programmatically to optimize the view angle according to the user position and the environment characteristics

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 25, 2013
Length: 112 pages
Edition : 1st
Language : English
ISBN-13 : 9781849697187
Vendor :
Microsoft
Languages :

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 : Apr 25, 2013
Length: 112 pages
Edition : 1st
Language : English
ISBN-13 : 9781849697187
Vendor :
Microsoft
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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 Can$6 each
Feature tick icon Exclusive print discounts
$279.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 Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 153.97
Kinect in Motion - Audio and Visual Tracking by Example
Can$41.99
Kinect for Windows SDK Programming Guide
Can$61.99
Augmented Reality with Kinect
Can$49.99
Total Can$ 153.97 Stars icon

Table of Contents

4 Chapters
Kinect for Windows – Hardware and SDK Overview Chevron down icon Chevron up icon
Starting with Image Streams Chevron down icon Chevron up icon
Skeletal Tracking Chevron down icon Chevron up icon
Speech Recognition 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.8
(6 Ratings)
5 star 83.3%
4 star 16.7%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




carla Jul 02, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book has a very straight-forward approach to kinect programming.By keeping it simple and concise you can easily understand and get into kinect!It's even got an hardware overview, which I found great in order to further understand.Even though it is a small book, you'll be amazed on how quickly you'll start programming with Kinect just by following the examples.If you have any programming basis and want to get started with Kinect, this book is a great tool.
Amazon Verified review Amazon
Dick Mandemaker Jul 22, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Although I'm not a developer pur sang, this book gave me great insight in how Kinect works and how you can use it to develop applications that use the video and audio tracking. Chapter 1 describes how Kinect works and what the current state of tracking enables. The next chapters give you enough clues to develop your own applications, and the notes and summary in each chapter makes reading and understanding easy. And finally in the appendix you will learn how to save time coding and testing on Kinect enabled applications by recording all the video data coming into an application from a Kinect sensor with Kinect Studio, injecting the recorded video in an application allowing us to test your code without getting out of your chair over and over again. All in all this book is worth reading!
Amazon Verified review Amazon
Matteo Jun 28, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a short and very easy to read book, but is very useful. Clemente Giorio and Massimo Fascinari have taken a very look leading approach to drawing you in to how to use the Kinect SDK and get used to NUI style development.After a fast introduction of hardware (chapter 1), book builds up very nicely on all the features enabled with Kinect like Cameras (chapter 2), Skeletons (chapter 3), Speech recognition (chapter 4) and useful tools (chapter 5).There are a lot of examples that help to understand all features and gradually go deeper into the understanding of the development with Kinect. This book is useful also for expert developer because introduces interesting tricks.Highly recommend this book for anyone interested in delving into Kinect.
Amazon Verified review Amazon
Lector Amante de los Libros Jul 24, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Giorio and Fascinari have done an excellent work on this book. A very helpful aid to get involved in the fascinating world of Kinect for Windows and motion control computing and the techniques for designing natural user interfaces (NUIs).Chapter 1, Kinect for Windows - Hardware and SDK Overview: An easy, yet thorough explanation of the Kinect sensor hardware architecture and its sensors. The reader of this chapter will finally understand the secrets behind the Kinect sensor and will understand how it tracks its users and their movements.Chapter 2, Starting with Image Streams: This chapter guides the reader through the implementation of code to capture data from the color stream, depth stream, and IR stream data. At the same time, the reader of this chapter becomes familiar with the different mechanisms to handle images.Chapter 3, Skeletal Tracking: Perhaps the most fun part of this book. The programmer will learn how to track motion and get control of the Kinect for Windows users' movement, by means of manipulating and controlling the skeletons in both the default mode and he seated mode (available in Kinect for Windows but not in Kinect for XBOX360).Chapter 4, Speech Recognition: This chapter helps the reader to understand how to manipulate the Kinect sensor audio stream data, how to work with grammars defined by XML files and programmatically and how to track audio coming from different directions.Definitely a must read for everyone interested in programming applications for Kinect for Windows. The only drawback is that this book focuses on version 1.6 of the Kinect for Windows SDK, and at the time of its publication, Microsoft has made available already version 1.7. Programmers should definitely refer to the newest SDK documentation in addition to reading this book in order to benefit from the new tools and features.
Amazon Verified review Amazon
Keith Harvey May 31, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really love technical books that get to the point!I can't stand most of the tomes that spend 100+ pages explaining the history of computer science or other nonsense. Kinect in Motion is NOT one of those books. It gets to the point of teaching you about audio and visual tracking and gives you some great development workflow tips along the way. When the authors do cover background information, it's directly related to learning the task at hand. Very cool!I was personally interested in this book because I've been wanting to understand Kinect's audio tracking abilities. While there are samples and blog posts out there floating around, I just never really got the whole picture of how things work. I've always wanted to build an intelligent video conferencing system that tracks users as they speak, and now I have what I need to make it happen.The book really is good at explaining motion tracking and especially the nuances around folks that are standing and sitting. For my goal of creating an intelligent video conferencing system. Most people are sitting, so this was very helpful.Overall, the style of this book is clean, focused, and sometimes you get little bits of humor which I appreciate. If you want to learn and more importantly UNDERSTAND Kinect audio and visual tracking, I highly recommend this book!Cheers!
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.