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
Arrow up icon
GO TO TOP
Augmented Reality with Kinect

You're reading from   Augmented Reality with Kinect If you know C/C++ programming, then this book will give you the ability to develop augmented reality applications with Microsoft's Kinect. By the end of the course you will have created a complete game.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781849694384
Length 122 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rui Wang Rui Wang
Author Profile Icon Rui Wang
Rui Wang
Arrow right icon
View More author details
Toc

Obtaining color and depth images


In this section, we are going to first learn how to obtain and display images from Kinect on the screen. OpenGL uses textures to contain image data and maps textures onto any mesh surface so that the images can be shown as surface colors. The mapping process requires the texture coordinates of surfaces, known as UVW coordinates in most 3D modeling software, to denote the texture's x/y/z axes for correct image painting. A good tutorial about the OpenGL texture mapping can be found at http://www.glprogramming.com/red/chapter09.html.

As we are not developing very complicated 3D applications, we can just simplify the whole process into two steps:

  • Creating a simple quad with four vertices that is always facing the screen, and mapping a 2D texture (with only UV coordinates set) onto it for displaying 2D images

  • Generating and updating the texture from Kinect image data every frame

Now let's start.

Drawing color and depth as textures

We will first obtain color and depth...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image