Merge #2
5
main.py
5
main.py
@ -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
|
||||||
@ -118,6 +120,5 @@ def OpenShifter():
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print('[ Error ] Can not connect to Arduino at /dev/ttyUSB1 ..')
|
print('[ Error ] Can not connect to Arduino at /dev/ttyUSB1 ..')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
Loading…
Reference in New Issue
Block a user