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