Celebration
This commit is contained in:
parent
8ff03abb53
commit
7d37fa8d91
@ -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';
|
||||
|
5
main.py
5
main.py
@ -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]])
|
||||
|
Loading…
Reference in New Issue
Block a user