O'Reilly logo

OpenNI Cookbook by Soroush Falahati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading and showing a frame from the image sensor (color/IR)

There is no doubt that the output of the image/color sensor in an RGB camera is useful. Here, we will teach you how to read frames from this sensor and show it to the user through OpenGL. Because showing and reading data from the IR sensor have the same procedure, we have tried to cover both of these sensors (Color and IR) in one example.

Getting ready

Create a project in Visual Studio 2010 and prepare it for working with OpenNI using the Creating a project in Visual Studio 2010 recipe of Chapter 2, OpenNI and C++ and then configure Visual Studio 2010 to use OpenGL using the Configuring Visual Studio 2010 to use OpenGL recipe of this chapter.

How to do it...

  1. Add the following lines above ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required