This (OpenCV) is something of a new subject for me. I’ve generally done motion tracking and data extraction with Adobe After Effects, but that’s focussed on tracking an object, and it’s fiddly to use for measuring the speed of the background. So I thought I’d experiment with the OpenCV library – which lets your program more exactly what you’d like to look at, but is a bit of a pain to use.
The lines are motion vectors, so they represent the direction and distance a group of pixels moves over a period of time (three frames in this example). OpenVC is calculating a pre-pixel “Optical Flow” map. I started with this tutorial
https://learnopencv.com/optical-flow-in-opencv/
and code
https://github.com/spmallick/learnopencv/tree/master/Optical-Flow-in-OpenCV
(and the usual StackOverflow
Originally posted by Metabunk.org