mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
opt_flow.py sample fixed
This commit is contained in:
parent
d4c094745f
commit
700ef09a23
@ -59,7 +59,7 @@ if __name__ == '__main__':
|
||||
while True:
|
||||
ret, img = cam.read()
|
||||
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, None, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
flow = cv2.calcOpticalFlowFarneback(prevgray, gray, 0.5, 3, 15, 3, 5, 1.2, 0)
|
||||
prevgray = gray
|
||||
|
||||
cv2.imshow('flow', draw_flow(gray, flow))
|
||||
|
Loading…
Reference in New Issue
Block a user