examples/computer_vision/opencvOpticalFlowExample/README.md
OpenCV is a powerful open-source library for image processing and computer vision. This example demonstrates one particularly common workflow in new-media art: performing optical flow. This is immensely useful for determining movement within the scene!
After studying this example, you'll understand how to:
When launching this app, you'll see a low resolution, colorized representation of the video. Movement in the video will cause elements in the app to change color, spin or move about the screen.
There are a few user-modifiable settings in this app:
space bar will change between the 3 modes.up and down keys will adjust the size of the opencv image that is used for calculating optical flow. The smaller the image, the faster the operation.left and right arrow keys to change the blur amount.m key.d key.One more thing. In line 7 of the ofApp.h file, you'll see the following line commented out:
//#define _USE_LIVE_VIDEO
If you uncomment this line, the app will use your computer's built-in webcam instead of a stored video file! It accomplishes this by swapping out the ofVideoPlayer with an ofVideoGrabber.
This example links against the ofxOpenCv core addon. It uses the following classes from that addon:
In addition, this example uses the following classes to access video from a live camera and/or a pre-stored file: