Merge #2

Merged
Hesham merged 5 commits from trainer into master 2018-11-23 14:09:27 +01:00
Showing only changes of commit a8d42397f2 - Show all commits

View File

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