Update 'face_recognition/app/app.py'
This commit is contained in:
parent
64fcca0456
commit
503770351f
@ -9,6 +9,7 @@ from werkzeug.datastructures import ImmutableMultiDict
|
||||
import base64
|
||||
import cv2
|
||||
import numpy as np
|
||||
import imutils
|
||||
app = Flask(__name__)
|
||||
minioClient = Minio('minio:9000', access_key=os.environ['s3-name'], secret_key=os.environ['s3-password'], secure=False)
|
||||
|
||||
@ -88,6 +89,7 @@ def check_id(id):
|
||||
def save_img(encoded_data, filename):
|
||||
nparr = np.fromstring(base64.urlsafe_b64decode(encoded_data), np.uint8)
|
||||
img = cv2.imdecode(nparr, cv2.IMREAD_ANYCOLOR)
|
||||
img = imutils.rotate(img, 90)
|
||||
return cv2.imwrite(filename, img)
|
||||
|
||||
def setup():
|
||||
|
Loading…
Reference in New Issue
Block a user