Skip to content

Commit

Permalink
add missing line for toggling fullscreen inside the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybreckon committed Mar 28, 2024
1 parent 5aea005 commit 59af189
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generic_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
# create window by name (as resizable)

cv2.namedWindow(window_name, cv2.WINDOW_NORMAL)
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
cv2.WINDOW_FULLSCREEN & args.fullscreen)

while (keep_processing):

Expand Down Expand Up @@ -115,8 +117,6 @@
# display image

cv2.imshow(window_name, frame)
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
cv2.WINDOW_FULLSCREEN & args.fullscreen)

# stop the timer and convert to ms. (to see how long processing and
# display takes)
Expand Down Expand Up @@ -148,6 +148,8 @@
keep_processing = False
elif (key == ord('f')):
args.fullscreen = not (args.fullscreen)
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
cv2.WINDOW_FULLSCREEN & args.fullscreen)

# close all windows

Expand Down

0 comments on commit 59af189

Please sign in to comment.