Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mucunwuxian committed Jan 7, 2024
1 parent b88cdd7 commit f9a92d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optical_flow_estimation/raft/raft.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,15 +689,15 @@ def recognize_from_video():
frame_before = frame_before[..., ::-1] # BGR2RGB

frame_shown = False
while(True):
while True:
# read frame
ret, frame_after = capture.read()
if RESIZE_ENABLE:
frame_after = cv2.resize(frame_after, (W,H))
if (cv2.waitKey(1) & 0xFF == ord('q')) or not ret:
break
if frame_shown and cv2.getWindowProperty('frame', cv2.WND_PROP_VISIBLE) == 0:
break
if RESIZE_ENABLE:
frame_after = cv2.resize(frame_after, (W,H))

# preprocessing
frame_after = frame_after[..., ::-1] # BGR2RGB
Expand Down

0 comments on commit f9a92d8

Please sign in to comment.