recognizer = cv2.face.LBPHFaceRecognizer_create()
recognizer.train(faces, np.array(ids))
recognizer.write(r'face_trainer\trainer.yml')
我看了网上大部分都是这样写的,但是运行时总是报
error: (-2:Unspecified error) File can't be opened for writing! in function 'cv::face::FaceRecognizer::write' 网上查不到解决办法。。