Exemple #1
0
        font = cv2.FONT_HERSHEY_SIMPLEX
        cv2.putText(img1, str(f1[:-4]), (30, img1.shape[0] - 20), font, 1,
                    (255, 255, 255), 2, cv2.LINE_AA)
        cv2.imwrite("result.jpg", img1)

        # return [1,str(f[:-4])]

        # return [0,""]


obj2 = Detector()
# obj2.detection()
obj1 = Recognition()
obj1.initialise("")
while True:
    t1 = threading.Thread(target=obj2.detection())
    t2 = threading.Thread(target=obj1.printResults(""))
    t1.start()
    t2.start()
    t1.join()
    t2.join()
# while True:
#     obj1=Recognition()

#     t1.start()
#     t1.join()
#     result,name=obj1.printResults("")
#     if result==1:
#         print("Face Recognised ",name)
#     # obj2.detection()