opt_flow.py sample fixed

This commit is contained in:
Alexander Mordvintsev 2011-09-02 11:54:02 +00:00
parent d4c094745f
commit 700ef09a23

View File

@ -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))