Celebration

This commit is contained in:
HeshamTB 2018-11-30 21:05:38 +00:00
parent 8ff03abb53
commit 7d37fa8d91
4 changed files with 131153 additions and 6 deletions

View File

@ -41,7 +41,6 @@ void loop() {
if (distance < 70) UltraOK = true;
else UltraOK = false;
if(digitalRead(ProxSensor) == LOW ) IROK = true;
else IROK = false;
char pi = 'N';

73686
faces/h Normal file

File diff suppressed because it is too large Load Diff

57467
faces/m

File diff suppressed because it is too large Load Diff

View File

@ -47,9 +47,8 @@ def start( camera, face_cascade):
j = 0
rawCapture = PiRGBArray(camera)
face_recognizer = cv2.createLBPHFaceRecognizer()
face_recognizer.load('faces/m')
face_recognizer.load('faces/h')
names = loadNames()
print('Known people '+ str(names))
while 1:
try:
camera.capture(rawCapture, format="bgr")
@ -88,7 +87,7 @@ def recognize(image,face_recognizer, names):
label= face_recognizer.predict(img)
except:
print('[ Error ] Error in Recognize() function')
if label[1] > 100:
if label[1] > 70:
return 'unknown'
else:
print(str(label) + ' >>'+names[label[0]])