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

Processing multiple frames

Till now we saw examples of modification and drawing video frames just like single images. Deeper processing should involve analysis of the several frames.

If we compare two successive frames, we can find the direction and velocity of motion for each frame pixel. Such a vector field is called optical flow. It has many uses in video, graphics, and computer vision. Optical flow computation is a nontrivial task of computer vision, and we will learn to do it in Chapter 9, Computer Vision with OpenCV.

Another idea is to bufferize a number of frames and then draw parts of the frames in different parts of the screen. The famous video effect called slit-scan or time displacement is based on this principle. In effect, horizontal ...

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