balintlaczko / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
1 stars 0 forks source link

Implement Optical flow #23

Closed balintlaczko closed 4 years ago

balintlaczko commented 4 years ago

this is a "fork" or Alxander's issue from the fourMs/MGT-python repo: A: It would be very nice to add support for optical flow. This could be done either within the mgmotion module, or, perhaps better, as a separate module. It should be possible to generate a motion video with optical flow arrows, and possibly also use this for creating a motiongram.

balintlaczko commented 4 years ago

Implemented optical flow - in a basic manner for now, which means that all the params of the algorithms are "dumped" on the user, which is OK for people who are computer vision scientists, and quite mysterious for everyone else. But it works, and it can give some meaningful results without specifying anything. Here is an example usage of the sparse optical flow:

from mgmodule import MgObject as Mg
Mg('dance.avi', starttime=5, endtime=10).flow.sparse().show()

and the dense optical flow:

from mgmodule import MgObject as Mg
Mg('dance.avi', starttime=5, endtime=10).flow.dense().show()