Major update of all demo programs to use new PEP8 bindings, etc
This commit is contained in:
parent
3f7c87c562
commit
7f52778bcc
307 changed files with 19546 additions and 3297 deletions
|
@ -2,9 +2,9 @@ import cv2, PySimpleGUI as sg
|
|||
window = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(filename='', key='image')],], location=(800,400))
|
||||
cap = cv2.VideoCapture(0) # Setup the camera as a capture device
|
||||
while True: # The PSG "Event Loop"
|
||||
event, values = window.Read(timeout=20, timeout_key='timeout') # get events for the window with 20ms max wait
|
||||
event, values = window.read(timeout=20, timeout_key='timeout') # get events for the window with 20ms max wait
|
||||
if event is None: break # if user closed window, quit
|
||||
window.FindElement('image').Update(data=cv2.imencode('.png', cap.read()[1])[1].tobytes()) # Update image in window
|
||||
window['image'].update(data=cv2.imencode('.png', cap.read()[1])[1].tobytes()) # Update image in window
|
||||
|
||||
"""
|
||||
Putting the comment at the bottom so that you can see that the code is indeed 7 lines long. And, there is nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue