I am using the function:
cvCalcOpticalFlowBM
To calculate the optical flow.
The code is running, but the velocity matrices are zero (both x and y), although the input video clearly changes.
Does anyone have an idea why would the velocity matrices be zero (black)?
This tutorial shows how to use optical flow in opencv from scratch. It explains how to draw velocity vectors etc.
http://robots.stanford.edu/cs223b05/notes/CS%20223-B%20T1%20stavens_opencv_optical_flow.pdf