Book Image

Augmented Reality with Kinect

By : Rui Wang
Book Image

Augmented Reality with Kinect

By: Rui Wang

Overview of this book

Microsoft Kinect changes the notion of user interface design. It differs from most other user input controllers as it enables users to interact with the program without touching the mouse or a trackpad. It utilizes motion sensing technology and all it needs is a real-time cameras, tracked skeletons, and gestures. Augmented Reality with Kinect will help you get into the world of Microsoft Kinect programming with the C/C++ language. The book will cover the installation, image streaming, skeleton and face tracking, multi-touch cursors and gesture emulation. Finally, you will end up with a complete Kinect-based game. Augmented Reality with Kinect will help you get into the world of Kinect programming, with a few interesting recipes and a relatively complete example. The book will introduce the following topics: the installation and initialization of Kinect applications; capturing color and depth images; obtaining skeleton and face tracking data; emulating multi-touch cursors and gestures; and developing a complete game using Kinect features. The book is divided in such a way so as to ensure that each topic is given the right amount of focus. Beginners will start from the first chapter and build up to developing their own applications.
Table of Contents (14 chapters)
Augmented Reality with Kinect
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Microsoft Kinect was released in the winter of 2010. As one of the first civil handsfree motion input devices, it brings a lot of fun to end users of Xbox 360 and Windows PCs. And because Kinect is very useful for designing interactive methods in user applications, new media artists and VJs (video jockeys) are also interested in this new technology as it makes their performances more dramatic and mystical.

In this book, we will focus on introducing how to develop C/C++ applications with the Microsoft Kinect SDK, as well as the FreeGLUT library for OpenGL support, and the FreeImage library for image loading. We will cover the topics of Kinect initialization, color and depth image streaming, and skeleton motion and face tracking, and discuss how to implement common gestures with Kinect inputs. A simple but interesting Fruit Ninja-like game will be implemented in the last chapter of this book. Some alternative middlewares and resources will be introduced in the Appendix, Where to Go from Here, for your reference.

What this book covers

Chapter 1, Getting Started with Kinect, shows you how to install Kinect hardware and software on your Windows PC and check if Kinect will start.

Chapter 2, Creating Your First Program, demonstrates how to create an OpenGL-based framework first and then initialize the Kinect device in user applications.

Chapter 3, Rendering the Player, shows you how to read color and depth images from the Kinect built-in cameras and display them in the OpenGL-based framework. A common way to implement the green screen effect is also discussed.

Chapter 4, Skeletal Motion and Face Tracking, demonstrates how to obtain and render the skeleton data calculated by the Kinect sensor. It also introduces the face detection and facial mesh generation APIs with examples.

Chapter 5, Designing a Touchable User Interface, shows you how to use Kinect APIs to simulate multi-touch inputs, which are very common in modern interactive applications and GUI developments.

Chapter 6, Implementing the Scene and Game Play, demonstrates how to make use of all prior knowledge we have gained to make a Fruit Ninja-like game, which uses Kinect as the input device.

Appendix, Where to Go from Here, introduces more alternative middleware and many resource websites for learning and developing Kinect.

What you need for this book

To use this book, you will need a graphics card with robust OpenGL support. It would be better if it is with the latest OpenGL device driver installed from your graphics hardware vendor.

You will also need a working Visual Studio compiler so as to convert C++ source code into executable files. A working Kinect hardware, Microsoft Kinect SDK, and Developer Kit are also required.

Who this book is for

This book is intended for software developers, researchers, and students who are interested in developing Microsoft Kinect-based applications. You should also have basic knowledge of C++ programming before reading this book. Some experience of programming real-time graphics APIs (for example, OpenGL) may be useful, but is not required.

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 updating of Kinect and user data will be done in the update() method."

A block of code is set as follows:

#include <GL/freeglut.h>
#include <iostream>

// The updating callback
void update()
{ glutPostRedisplay(); }

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

#include <GL/freeglut.h>
#include <iostream>

// The updating callback
void update()
{ glutPostRedisplay(); }

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: "clicking the Next button moves you to the next screen".

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 via 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.

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.