O'Reilly logo

Mastering openFrameworks: Creative Coding Demystified by Denis Perevalov

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

Using images for internal calculations

In this chapter we have considered the images mainly as building blocks of a visual scene. In this last section, we will see how images can be used in another way, as the source of data for internal calculations, not displaying on the screen directly. The main examples of such usage are masks and palettes, which we'll discuss now.

An image as a mask

Color cameras and depth cameras give color and depth images that represent the scene they capture (for example, humans in front of the camera). Such images can be processed using pixel-by-pixel methods or with the computer vision library, OpenCV. The result is often a binary image, which is called mask , that contains black pixels denoting the background and white ...

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