Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-24 13:04:52 +00:00
parent 5bb85d7277
commit 48bd7d8950

View File

@ -86,7 +86,7 @@ def check_id(id):
return known return known
def save_img(encoded_data, filename): def save_img(encoded_data, filename):
nparr = np.fromstring(base64.b64decode(encoded_data), np.uint8) nparr = np.fromstring(base64.urlsafe_b64decode(encoded_data), np.uint8)
img = cv2.imdecode(nparr, cv2.IMREAD_ANYCOLOR) img = cv2.imdecode(nparr, cv2.IMREAD_ANYCOLOR)
return cv2.imwrite(filename, img) return cv2.imwrite(filename, img)