Augmented Reality with Kinect
By Rui Wang
()
About this ebook
Related to Augmented Reality with Kinect
Related ebooks
Learning JavaScript Robotics Rating: 3 out of 5 stars3/5Intel Galileo Essentials Rating: 0 out of 5 stars0 ratingsMastering Android NDK Rating: 0 out of 5 stars0 ratingsMicroPython Projects: A do-it-yourself guide for embedded developers to build a range of applications using Python Rating: 0 out of 5 stars0 ratingsRaspberry Pi LED Blueprints Rating: 0 out of 5 stars0 ratingsAugmented Reality for Android Application Development Rating: 0 out of 5 stars0 ratingsComputer Vision for the Web Rating: 0 out of 5 stars0 ratingsGetting Started with UDOO Rating: 0 out of 5 stars0 ratingsApplication Development with Qt Creator - Second Edition Rating: 4 out of 5 stars4/5Kinect in Motion – Audio and Visual Tracking by Example Rating: 0 out of 5 stars0 ratingsBluetooth Low Energy LE Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsComputer Vision with Maker Tech: Detecting People With a Raspberry Pi, a Thermal Camera, and Machine Learning Rating: 0 out of 5 stars0 ratingsDeep Neural Nets A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsAugmented Reality AR Third Edition Rating: 0 out of 5 stars0 ratingsHaxe Game Development Essentials Rating: 0 out of 5 stars0 ratingsRobots. The New Era. Living, working and investing in the robotics society of the future. Rating: 0 out of 5 stars0 ratingsDeep Neural Nets Deep Learning A Complete Guide Rating: 0 out of 5 stars0 ratingsKinect for Windows SDK Programming Guide Rating: 4 out of 5 stars4/5Bare-Metal Embedded C Programming: Develop high-performance embedded systems with C for Arm microcontrollers Rating: 0 out of 5 stars0 ratingsKinect Open Source Programming Secrets: Hacking the Kinect with OpenNI, NITE, and Java Rating: 0 out of 5 stars0 ratingsSimultaneous multithreading A Complete Guide Rating: 0 out of 5 stars0 ratingsAnsible for Real-Life Automation: A complete Ansible handbook filled with practical IT automation use cases Rating: 0 out of 5 stars0 ratingsPython APIs: From Concept to Implementation Rating: 5 out of 5 stars5/5Neuromorphic Hardware Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsThe Official Raspberry Pi Projects Book Volume 4: 200 Pages of Inspiration and Ideas. 55 Projects & Guides Rating: 0 out of 5 stars0 ratingsBitcoin and Lightning Network on Raspberry Pi: Running Nodes on Pi3, Pi4 and Pi Zero Rating: 0 out of 5 stars0 ratingsFrom Zero to Market with Flutter Rating: 0 out of 5 stars0 ratings
Computers For You
Elon Musk Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 5 out of 5 stars5/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Uncanny Valley: A Memoir Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 5 out of 5 stars5/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5People Skills for Analytical Thinkers Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Learning the Chess Openings Rating: 5 out of 5 stars5/5Ultimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5The Data Warehouse Toolkit: The Definitive Guide to Dimensional Modeling Rating: 0 out of 5 stars0 ratings
Reviews for Augmented Reality with Kinect
0 ratings0 reviews
Book preview
Augmented Reality with Kinect - Rui Wang
Table of Contents
Augmented Reality with Kinect
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Kinect
Installation of Kinect
Setting up your Kinect software on PCs
Why did I do that?
The idea of the AR-based Fruit Ninja game
Summary
2. Creating Your First Program
Preparing the development environment
Building the Visual Studio project
Starting the device
Initializing and using Kinect in C++
Understanding the code
Additional information
Summary
3. Rendering the Player
Choosing image stream types
Obtaining color and depth images
Drawing color and depth as textures
Understanding the code
An incorrect way to combine depth and color
A traditional way for background subtraction
Understanding the code
Aligning color with depth
Generating a color image from depth
Understanding the code
Additional information
Using a green screen with Kinect
Making a magic photographer
Understanding the code
Additional information
Summary
4. Skeletal Motion and Face Tracking
Understanding skeletal mapping
Obtaining joint positions
Drawing the skeleton
Understanding the code
Drawing the linetrails following the hands
Drawing the path for specified joints
Understanding the code
Face tracking in Kinect
Detecting a face from the camera
Detecting and drawing the face rectangle
Understanding the code
Constructing the face model
Drawing the parametric face model
Understanding the code
Summary
5. Designing a Touchable User Interface
Multitouch systems
Locating the cursors
Drawing cursors from two hands
Understanding the code
Additional information
Common touching gestures
Recognizing holding and swiping gestures
Drawing cursors using two hands
Understanding the code
Additional information
Sending cursors to external applications
Emulating Windows mouse with cursors
Understanding the code
Summary
6. Implementing the Scene and Gameplay
Integrating the current code
Integrating existing elements in a scene
Understanding the code
Cutting the fruits
Adding and handling fruit objects
Understanding the code
Playing the game
Adding simple game logic
Understanding the code
Additional information
Summary
A. Where to Go from Here
libfreenect – the pioneer of Kinect middleware
OpenNI – a complete and powerful Kinect middleware
Free and open source resources
Commercial products using Kinect
Index
Augmented Reality with Kinect
Augmented Reality with Kinect
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2013
Production Reference: 1040713
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84969-438-4
www.packtpub.com
Cover Image by Suresh Mogre (<suresh.mogre.99@gmail.com>)
Credits
Author
Rui Wang
Reviewers
Ricard Borràs Navarra
Vangos Pterneas
Acquisition Editor
Kartikey Pandey
Commissioning Editors
Llewellyn Rozario
Priyanka Shah
Technical Editors
Sumedh Patil
Aniruddha Vanage
Copy Editors
Insiya Morbiwala
Alfida Paiva
Laxmi Subramanian
Project Coordinator
Amigya Khurana
Proofreader
Maria Gould
Indexer
Rekha Nair
Graphics
Abhinash Sahu
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
About the Author
Rui Wang is a Software Engineer at Beijing Crystal Digital Technology Co., Ltd. (Crystal CG), in charge of the new media interactive application design and development. He wrote a Chinese book called OpenSceneGraph Design and Implementation in 2009. He also wrote the book OpenSceneGraph 3.0 Beginner's Guide in 2010 and OpenSceneGraph 3.0 Cookbook in 2012, both of which are published by Packt Publishing and co-authored by Xuelei Qian. In his spare time he also writes novels and is a guitar lover.
I must express my deep gratitude to the entire Packt Publishing team for their great work in producing a series of high-quality Mini books, including this one, which introduces the cutting-edge Kinect-based development. Many thanks to Zhao Yang and my other colleagues at Crystal CG, for their talented ideas on some of the recipes in this book. And last but not the least, I'll extend my heartfelt gratitude to my family for their love and support.
About the Reviewers
Ricard Borràs Navarra has always been working around computer vision and machine learning. He started creating machines that apply pattern recognition to quality assortment in the cork production industry. Later, he applied these techniques for human tracking in complex scenarios, creating audience measurement, and people-counter solutions for retail stores.
With the eruption of Kinect, he started working on and deploying augmented reality interactive applications based on this great device. These applications were targeted at the marketing and retail sectors.
All these projects were developed by him as an Inspecta (www.inspecta.es) employee. Also, Ricard has developed several freelance projects based on augmented reality.
Vangos Pterneas is a professional Software Engineer, passionate about natural user interfaces. He has been a Kinect enthusiast ever since the release of the very first unofficial SDKs and has already published a couple of commercial Kinect applications.
He has worked for Microsoft Innovation Center as a .NET developer and consultant and he's now running his own company named LightBuzz. LightBuzz has been awarded the first place in Microsoft's worldwide innovation competition, held in New York.
When he is not coding, he loves blogging about technical stuff and providing the community with open source utilities.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
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