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

Enabling/disabling auto exposure and auto white balance

Image sensor has built-in auto exposure and auto white balance. In this recipe, we are going to show you how we can change the image sensor's settings to change the active state of these features.

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++.

Then, copy the code from the Reading and showing a frame from the image sensor (color/IR) recipe of Chapter 3, Using Low-level Data, to this project.

How to do it...

  1. Locate the following lines of code:
    void gl_KeyboardCallback(unsigned char key, int x, int y)
    {
  2. Replace any code inside this function with the following code snippet: ...

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