There are lots of ways to do this sort of thing, but you might take a look at this example, which breaks a video stream up into a grid.
https://github.com/bakercp/ofxOpticalFlowFarneback/tree/master/example-spin
There are lots of ways to do this sort of thing, but you might take a look at this example, which breaks a video stream up into a grid.
https://github.com/bakercp/ofxOpticalFlowFarneback/tree/master/example-spin