I got:
File "c:/Users/Harshit Singh/Desktop/Project/face_recognize.py", line 51
cv2.putText(im,'% s - %.0f' %
Error from below code can you tell me why?
There is error in Line 51 (%) and I don't know why I'm not able to figure it out.
cv2.putText(im,'% s - %.0f' %
(names[prediction[0]], prediction[1]),
(x-10, y-10),cv2.FONT_HERSHEY_PLAIN, 1, (0, 255, 0))
else:
cv2.putText(im, 'not recognized',
(x-10, y-10), cv2.FONT_HERSHEY_PLAIN, 1, (0, 255, 0))
cv2.imshow('OpenCV', im)
key = cv2.waitKey(10)
if key == 27:
break
I think I have done some mistake in directory (just a guess) or I am returning the value 0.
This project is for my college.