Skip to content

Commit 5200a36

Browse files
committed
add fullscreen command line option
1 parent f4d8752 commit 5200a36

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

canny.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
type=int,
4545
nargs=2,
4646
help='override default camera resolution as H W')
47+
parser.add_argument(
48+
"-fs",
49+
"--fullscreen",
50+
action='store_true',
51+
help="run in full screen mode")
4752
parser.add_argument(
4853
'video_file',
4954
metavar='video_file',
@@ -96,6 +101,8 @@ def nothing(x):
96101

97102
cv2.namedWindow(window_name, cv2.WINDOW_NORMAL)
98103
cv2.namedWindow(window_name2, cv2.WINDOW_NORMAL)
104+
cv2.setWindowProperty(window_name2, cv2.WND_PROP_FULLSCREEN,
105+
cv2.WINDOW_FULLSCREEN & args.fullscreen)
99106

100107
# add some track bar controllers for settings
101108

0 commit comments

Comments
 (0)