OpenCV CalcOpticalFlowHS Horn-Schunck

The default lambda=1.0 smoothness parameter for OpenCV 2.4 CalcOpticalFlowHS does not work well for some cases. Also, OpenCV’s lambda is different from Matlab Computer Vision Toolbox Horn Schunck opticalFlowHS('Smoothness',1.0) parameter, which also defaults to 1.0.

Horn Schunck Optical Flow comparison between Matlab and Python shows that OpenCV CalcOpticalFlowHS setting lambda=0.001 gives results that are much more like Matlab. OpenCV no longer has the original Horn Schunck optical flow.

Linearized Horn Schunck has problems with large displacements in the image, which can be resolved by a pyramidal algorithm.