Lucas Kanade Optical Flow, Direction Vector

前端 未结 2 1113
广开言路
广开言路 2021-02-06 08:39

I am working on optical flow, and based on the lecture notes here and some samples on the Internet, I wrote this Python code.

All code and sample images are there as wel

相关标签:
2条回答
  • 2021-02-06 09:26

    @belisarius says "LK uses a first order approximation, and so (u,v) should be ideally << 1, if not, higher order terms dominate the behavior and you are toast. ".

    0 讨论(0)
  • 2021-02-06 09:33

    A standard conclusion from the optical flow constraint equation (OFCE, slide 5 of your reference), is that "your motion should be less than a pixel, less higher order terms kill you". While technically true, you can overcome this in practice using larger averaging windows. This requires that you do sane statistics, i.e. not pure least square means, as suggested in the slides. Equally fast computations, and far superior results can be achieved by Tikhonov regularization. This necessitates setting a tuning value(the Tikhonov constant). This can be done as a global constant, or letting it be adjusted to local information in the image (such as the Shi-Tomasi confidence, aka structure tensor determinant).

    Note that this does not replace the need for multi-scale approaches in order to deal with larger motions. It may extend the range a bit for what any single scale can deal with.

    Implementations, visualizations and code is available in tutorial format here, albeit in Matlab not Python.

    0 讨论(0)
提交回复
热议问题