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

Using a green screen with Kinect


Now we can develop a simple game to satisfy ourselves, which will also be used as part of our Fruit Ninja game. The idea can be described as a magic photographer who automatically puts the photo of the player in front of the Kinect device onto any scenery images, pretending that he had taken this photo some time ago.

The example we just finished is used to show a player with a single colored background, so the only work left is to load a still image from the disk and blend it with the player image to produce a final composite photo.

Making a magic photographer

Let's continue working on the previous example code we created, which already contains the kernel functionality for our use:

  1. We need a background image to be shown under the player's image. The alpha channel of the player texture will be used to decide if the background should show or not. FreeImage is used to load the image from a disk file and bind it to an OpenGL texture. The global ID for the texture...

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