2020-04-06 18:59:23 +00:00
|
|
|
import cv2, PySimpleGUI as sg
|
2021-04-29 20:20:38 +00:00
|
|
|
window, cap = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(key='-IMAGE-')], ], location=(800, 400)), cv2.VideoCapture(0)
|
2019-10-03 01:13:58 +00:00
|
|
|
while window(timeout=20)[0] is not None:
|
2021-04-29 20:20:38 +00:00
|
|
|
window['-IMAGE-'](data=cv2.imencode('.png', cap.read()[1])[1].tobytes())
|