1 | initial version |
if you do a :
>>> help(cv2.calcOpticalFlowFarneback)
Help on built-in function calcOpticalFlowFarneback:
calcOpticalFlowFarneback(...)
calcOpticalFlowFarneback(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags) -> flow
in the python repl, you can see the signature.
so, the problem, seems the flow
param, you can either use None
, like in the tutorial, but, if you simply omit it, any following param must be adressed by name, like:
cv2.calcOpticalFlowFarneback(gray1, gray2, pyr_scale=0.5, levels=3, winsize=15, iterations=2, poly_n=5, poly_sigma=1.2, flags=0)
2 | No.2 Revision |
if you do a :
>>> help(cv2.calcOpticalFlowFarneback)
Help on built-in function calcOpticalFlowFarneback:
calcOpticalFlowFarneback(...)
calcOpticalFlowFarneback(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags) -> flow
in the python repl, you can see the signature.
so, the problem, seems the flow
param, you can either have to use None
, like in the tutorial, but, if you simply omit it, any following param must be adressed by name, like:,
flow = cv2.calcOpticalFlowFarneback(gray1, gray2, pyr_scale=0.5, levels=3, winsize=15, iterations=2, poly_n=5, poly_sigma=1.2, flags=0)
None, 0.5, 3, 15, 2, 5, 1.2, 0)