Exemplo n.º 1
0
    jump_booster = 1

if speed == 'm':
    jump_booster = 2

if speed == 'f':
    jump_booster = 3

print("You chose the {} velocity".format(speed))

arduino_connection = arduino.createConnection(
    '/dev/ttyUSB0')  # Change it for your port here.
arduino.setServoInCenter(arduino_connection)

person1 = Registration()
person1.create_file()
person1.take_photo(0)  # webcam = 0 / video = 1

video_capture = cv2.VideoCapture(0)

fps = FPS()
fps.start()

# Load a sample picture and learn how to recognize it.
target_image = face_recognition.load_image_file(person1.dir)
target_face_encoding = face_recognition.face_encodings(target_image)[0]

# Create arrays of known face encodings and their names
known_face_encodings = [target_face_encoding]

known_face_names = [person1.name]