Note: this bit of code is a simple wrapper around the optical-flow algorithm developped/published by C.Liu:
C. Liu. Beyond Pixels: Exploring New Representations and Applications for Motion Analysis. Doctoral Thesis. Massachusetts Institute of Technology. May 2009.