I was making some code OF addon friendly ant thought that someone could find this class useful; motion templates keep track of the motion history in a video stream and can be a optical flow substitute for tracking movements and gestures.

The class is here, it works, but is betaish: I really want to polish it a little bit and add a few more features.

Here you can see a quick demo:

Super nice! Thank you!