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

Constructing the face model


Now we will extend the previous example to support rendering the face mesh onto the color image. The face mesh itself may not be useful for your own applications, but it is in fact composited by a few parameterized points, that is, animation units (AU) and shape units (SU). The face tracking results can also be represented in terms of the weights of six AUs and 11 SUs, which will be explained in the forthcoming Understanding the code section.

Drawing the parametric face model

Now we are going to draw a 3D mesh of the face we have detected, which is formed by a list of vertices and normals, as well as the triangle indices. The Microsoft Kinect SDK already provides SDKs to obtain this data and this example will only draw them on the screen with OpenGL commands.

  1. Common mesh data contains two parts: the vertices on the mesh, and the triangles composing the whole mesh, each of which includes three vertices. We define two variables at first to store the vertex data and...