OpenCV cv.CalcOpticalFlowHS Horn-Schunck smoothness lambda parameter

The default lambda=1.0 smoothness parameter for OpenCV 2 cv.CalcOpticalFlowHS is not the same as what= Matlab calls lambda=1.0.

With this example implementation in calcOptFlow.py I found that in OpenCV cv.CalcOpticalFlowHS setting lambda=0.001 gives results that are much more like Matlab–I can see the fine details.

OpenCV 3.x no longer has the original Horn Schunck optical flow

Alternatives include:

General issues with legacy optical flow estimation

Linearized Horn Schunck has problems with large displacements in the image, which can be resolved by a pyramidal algorithm, or by using the more modern optical flow algorithms in OpenCV 3.x.

Tags:

Categories:

Updated:

Leave a Comment