import sys & waitkey

This commit is contained in:
HeshamTB 2018-11-23 08:21:11 +00:00
parent 814d3d2dd1
commit a8d42397f2

View File

@ -3,6 +3,7 @@ from time import sleep
from io import BytesIO
import os
import serial
import sys
try:
import numpy as np
@ -11,6 +12,7 @@ try:
except Exception as ex:
print('[ Error ] some depandincies are missing\n'+ str(ex.args))
sys.exit()
def init():
go = True
@ -62,7 +64,7 @@ def start( camera, face_cascade):
cv2.putText(img, person, (x, y), cv2.FONT_HERSHEY_PLAIN, 1.7, (255, 0, 0), 2)
cv2.imshow('image',img)
cv2.waitKey(10)
cv2.waitKey(100)
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
@ -119,5 +121,4 @@ def OpenShifter():
print('[ Error ] Can not connect to Arduino at /dev/ttyUSB1 ..')
init()