在OpenCV的火车函数self.recognizer.train(self.images, self.lables)
中传递图像和标签后,它告诉我“不支持的格式”。拜托,可能是什么问题?
class Recognizer:
def __init__(self):
self.images=[]
self.lables=np.array([])
def train(self,images,lables):
self.images = images
self.lables = np.array(lables)
recogs = cv2.face.LBPHFaceRecognizer_create()
self.recognizer = recogs
self.recognizer.train(self.images, self.lables)
self.recognizer.save('trainner.yml')