Update Demo_OpenCV_4_Line_Program.py

This commit is contained in:
PySimpleGUI 2020-04-06 14:57:25 -04:00 committed by GitHub
parent 99915bbfdc
commit 204e5b2edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import cv2, PySimpleGUIWeb as sg
import cv2, PySimpleGUI as sg
window, cap = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(filename='', key='image')], ], location=(800, 400)), cv2.VideoCapture(0)
while window(timeout=20)[0] is not None:
window['image'](data=cv2.imencode('.png', cap.read()[1])[1].tobytes())