Но при этом я получаю следующее сообщение об ошибке:
Код: Выделить всё
line 62, in getRep\n rgbImg = cv2.cvtColor(imgFrame,
cv2.COLOR_BGR2RGB)\nTypeError: src data type = 17 is not supported\n
Код: Выделить всё
def getRep(self, imgFrame, multiple=False):
bgrImg = imgFrame.copy()
cv2.imshow('debug', imgFrame) #this line does show a BGR image
cv2.waitKey(0)
rgbImg = cv2.cvtColor(imgFrame, cv2.COLOR_BGR2RGB)
def recognize(self, imgFramePath):
imgFrame= cv2.imread(imgFramePath)
imgFrame = np.array(imgFrame)
reps = self.getRep(imgFrame, False)
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/456 ... -supported