Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 319c012

Browse files
committed
setWindowTitle
1 parent c75b240 commit 319c012

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎ch05-视频/5.VideoCapture.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@
4949

5050
# Display the resulting frame
5151
cv2.imshow('frame', gray)
52+
cv2.setWindowTitle('frame', 'COLOR_BGR2GRAY')
5253

5354
# Property=cv2.getWindowProperty('frame',0)#无用
5455

5556
# if cv2.waitKey(1) & 0xFF == ord('q'):#不行
5657
# break
57-
key = cv2.waitKey(delay=1)
58+
key = cv2.waitKey(delay=10)
5859
if key == ord("q"):
5960
break
6061

‎ch05-视频/two_camera.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424

2525
if ret0:
2626
cv2.imshow('frame0', frame0)
27+
cv2.setWindowTitle('frame0','On Top')
2728
if ret1:
2829
cv2.imshow('frame1', frame1)
2930
# cv2.moveWindow('frame1', x=frame0.shape[1], y=0)
30-
cv2.moveWindow('frame1', x=320, y=10)
31+
cv2.moveWindow('frame1', x=320, y=40)
3132

3233
key = cv2.waitKey(delay=2)
3334
if key == ord("q"):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /